function form_builder_preview in Form Builder 6
Same name and namespace in other branches
- 7.2 includes/form_builder.admin.inc \form_builder_preview()
- 7 includes/form_builder.admin.inc \form_builder_preview()
Form. Given a form array, present it for editing in a preview.
2 string references to 'form_builder_preview'
- form_builder_field_render in includes/
form_builder.admin.inc - Render a single field independent of other settings.
- form_builder_interface in includes/
form_builder.admin.inc - Main form building interface. Can be used as a menu callback.
File
- includes/
form_builder.admin.inc, line 212 - form_builder.admin.inc Administrative interface for editing forms.
Code
function form_builder_preview(&$form_state, $form, $form_type, $form_id) {
// Make modifications to all form elements recursively.
$element_ids = form_builder_preview_prepare($form, $form_type, $form_id);
// Record all the element IDs within the entire form.
$form['#form_builder']['element_ids'] = $element_ids;
$form['#form_builder']['form_type'] = $form_type;
$form['#form_builder']['form_id'] = $form_id;
// Add a pre_render to the entire form itself.
$form['#pre_render'][] = 'form_builder_pre_render_form';
$form['#form_builder_wrappers'] = array(
'form_builder_wrapper',
);
$form['#post_render'][] = 'form_builder_wrappers';
return $form;
}