You are here

function hook_addressfield_standard_widget_refresh_alter in Address Field 7

Allows modules to add arbitrary AJAX commands to the array returned from the standard address field widget refresh.

Parameters

&$commands: The array of AJAX commands used to refresh the address field widget.

$form: The rebuilt form array.

$form_state: The form state array from the form.

See also

addressfield_standard_widget_refresh()

1 invocation of hook_addressfield_standard_widget_refresh_alter()
addressfield_standard_widget_refresh in ./addressfield.module
Ajax callback in response to a change of country in an address field.

File

./addressfield.api.php, line 111
API documentation for Addressfield.

Code

function hook_addressfield_standard_widget_refresh_alter(&$commands, $form, $form_state) {

  // Display an alert message.
  $commands[] = ajax_command_alert(t('The address field widget has been updated.'));
}