function form_builder_remove_page in Form Builder 6
Same name and namespace in other branches
- 7.2 includes/form_builder.admin.inc \form_builder_remove_page()
- 7 includes/form_builder.admin.inc \form_builder_remove_page()
Menu callback for removing a field.
1 string reference to 'form_builder_remove_page'
- form_builder_menu in ./
form_builder.module - Implementation of hook_menu().
File
- includes/
form_builder.admin.inc, line 165 - form_builder.admin.inc Administrative interface for editing forms.
Code
function form_builder_remove_page($form_type, $form_id, $element_id) {
$output = drupal_get_form('form_builder_field_remove', $form_type, $form_id, $element_id);
if (isset($_REQUEST['js']) && !isset($_REQUEST['return'])) {
// This after build function immediately returns the form as JSON.
$data = array(
'formType' => $form_type,
'formId' => $form_id,
'elementId' => $element_id,
'html' => $output,
);
form_builder_json_output($data);
exit;
}
return $output;
}