On this page
function ajax_command_update_build_id
ajax_command_update_build_id($form)
Creates a Drupal Ajax 'update_build_id' command.
This command updates the value of a hidden form_build_id input element on a form. It requires the form passed in to have keys for both the old build ID in #build_id_old and the new build ID in #build_id.
The primary use case for this Ajax command is to serve a new build ID to a form served from the cache to an anonymous user, preventing one anonymous user from accessing the form state of another anonymous users on Ajax enabled forms.
Parameters
$form: The form array representing the form whose build ID should be updated.
Related topics
File
- includes/ajax.inc, line 1288
- Functions for use with Drupal's Ajax framework.
Code
function ajax_command_update_build_id($form) {
return array(
'command' => 'updateBuildId',
'old' => $form['#build_id_old'],
'new' => $form['#build_id'],
);
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!ajax.inc/function/ajax_command_update_build_id/7.x