ahah_example_dropdown_callback

6 dependent_dropdown.inc ahah_example_dropdown_callback()

The AHAH callback. It processes the form using ahah_example_callback_helper() and then

1 string reference to 'ahah_example_dropdown_callback'

File

ahah_example/dependent_dropdown.inc, line 81
Show/hide textfields based on checkbox clicks.

Code

function ahah_example_dropdown_callback() {
  $form = ahah_example_callback_helper();

  $changed_elements = $form['dependent_dropdown_holder'];

  // Prevent duplicate wrappers.
  unset($changed_elements['#prefix'], $changed_elements['#suffix']);

  $output = theme('status_messages') . drupal_render($changed_elements);

  drupal_json(array(
    'status' => TRUE, 
    'data' => $output,
  ));
}
Login or register to post comments