1 ajax_example.module ajax_example_simplest_callback($form, $form_state)

Callback for ajax_example_simplest.

On an ajax submit, the form builder function is called again, then the $form and $form_state are passed to this callback function so it can select which portion of the form to send on to the client.

Return value

array: Renderable array (the textfield element)

Related topics


modules/examples/ajax_example/ajax_example.module, line 345
Hook implementations for the AJAX Example module.


function ajax_example_simplest_callback($form, $form_state) {
  // The form has already been submitted and updated. We can return the replaced
  // item as it is.
  return $form['replace_textfield'];