You are here

function _ajax_countries_continent_widget_callback in Countries 8

Same name and namespace in other branches
  1. 7.2 countries.fields.inc \_ajax_countries_continent_widget_callback()

Returns the country element filtered by continent via AJAX.

1 string reference to '_ajax_countries_continent_widget_callback'
countries_field_widget_form in ./countries.fields.inc
Implements hook_field_widget_form().

File

./countries.fields.inc, line 372
All field related code.

Code

function _ajax_countries_continent_widget_callback($form, $form_state) {
  $parents = $form_state['triggering_element']['#array_parents'];
  array_pop($parents);
  $parents[] = 'iso2';
  $element = drupal_array_get_nested_value($form, $parents);
  return $element;
}