You are here

function context_field_select_callback in Context Field 7

Returns an array of parents for ajax.

File

./context_field.module, line 295
Context Field

Code

function context_field_select_callback($form, $form_state) {
  $return = $form;

  // Find the field on which we were invoked
  foreach ($form_state['triggering_element']['#array_parents'] as $key) {
    $return = $return[$key];
  }
  return $return;
}