function hook_entityreference_autofill_ajax_commands_alter in Entity reference autofill 7
Alter the ajax commands returned on entity selection.
Parameters
array &$commands: Array of ajax replace commands to return.
array $context: Form context variables.
- form: The entity form array.
- form_state: Current state of the entity form.
1 invocation of hook_entityreference_autofill_ajax_commands_alter()
- entityreference_autofill_form_autofill in ./
entityreference_autofill.module - AJAX callback for entity selection.
File
- ./
entityreference_autofill.api.php, line 75 - Hook documentation for the Entity reference autofill module.
Code
function hook_entityreference_autofill_ajax_commands_alter(&$commands, $context) {
// Add "ajax-changed" class to body tag.
$commands[] = ajax_command_changed('body');
}