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

Selects just the second dropdown to be returned for re-rendering.

Since the controlling logic for populating the form is in the form builder function, all we do here is select the element and return it to be updated.

Return value

array: Renderable array (the second dropdown)

Related topics


modules/examples/ajax_example/ajax_example.module, line 607
AJAX Examples module file with basic examples.


function ajax_example_dependent_dropdown_callback($form, $form_state) {
  return $form['dropdown_second'];