You are here

function uc_store_update_address_field_zones in Ubercart 7.3

Ajax callback: updates the zone select box when the country is changed.

1 string reference to 'uc_store_update_address_field_zones'
uc_store_process_address_field in uc_store/uc_store.module
Element process hook for address fields.

File

uc_store/uc_store.module, line 493
Contains global Ubercart functions and store administration functionality.

Code

function uc_store_update_address_field_zones($form, &$form_state) {
  $element =& $form;
  foreach (array_slice($form_state['triggering_element']['#array_parents'], 0, -1) as $field) {
    $element =& $element[$field];
  }
  $prefix = empty($element['#key_prefix']) ? '' : $element['#key_prefix'] . '_';
  return $element[$prefix . 'zone'];
}