You are here

function ahah_example_autotextfields_callback in Examples for Developers 6

1 string reference to 'ahah_example_autotextfields_callback'
ahah_example_menu in ahah_example/ahah_example.module
Implement hook_menu().

File

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

Code

function ahah_example_autotextfields_callback() {
  $form = ahah_example_callback_helper();
  $textfields = $form['textfields'];

  // Remove the prefix/suffix wrapper so we don't double it up.
  unset($textfields['#prefix'], $textfields['#suffix']);

  // Render the output.
  $output = theme('status_messages');
  $output .= drupal_render($textfields);

  // Final rendering callback.
  drupal_json(array(
    'status' => TRUE,
    'data' => $output,
  ));
  exit;
}