function ad_form_ahah in Advertisement 7
Same name and namespace in other branches
- 6.3 ad.module \ad_form_ahah()
- 6.2 ad.module \ad_form_ahah()
Ad type switch AHAH menu handler.
File
- ./
ad.module, line 869
Code
function ad_form_ahah() {
$form_state = array(
'storage' => NULL,
'submitted' => FALSE,
);
$form_build_id = $_POST['form_build_id'];
$form = form_get_cache($form_build_id, $form_state);
ad_form_add_adtype_elements($form, $_POST['adtype_select']);
form_set_cache($form_build_id, $form, $form_state);
$form += array(
'#post' => $_POST,
'#programmed' => FALSE,
);
// Rebuild the form.
$form = form_builder($_POST['form_id'], $form, $form_state);
$output = drupal_render($form['adtype_elements']);
drupal_json(array(
'status' => TRUE,
'data' => $output,
));
}