function form_builder_interface in Form Builder 7
Same name and namespace in other branches
- 6 includes/form_builder.admin.inc \form_builder_interface()
- 7.2 includes/form_builder.admin.inc \form_builder_interface()
Main form building interface. Can be used as a menu callback.
Parameters
$form_type: The type of form being edited. Usually the name of the providing module.
$form_id: The unique identifier for the form being edited with the type.
1 call to form_builder_interface()
- form_builder_webform_components_page in modules/
webform/ form_builder_webform.module - Menu callback; display a form builder interface to edit webform components.
1 string reference to 'form_builder_interface'
- form_builder_examples_menu in examples/
form_builder_examples.module - Implementation of hook_menu().
File
- includes/
form_builder.admin.inc, line 16 - form_builder.admin.inc Administrative interface for editing forms.
Code
function form_builder_interface($form_type, $form_id) {
module_load_include('inc', 'form_builder', 'includes/form_builder.api');
module_load_include('inc', 'form_builder', 'includes/form_builder.cache');
// Set the current form type (used for display of the sidebar block).
form_builder_active_form($form_type, $form_id);
// Create an internal state from the permanently stored form.
$loader = FormBuilderLoader::instance();
$form_obj = $loader
->fromStorage($form_type, $form_id);
$form_obj
->save();
$output = array();
$output[] = drupal_get_form('form_builder_preview', $form_obj, $form_type, $form_id);
$output[] = drupal_get_form('form_builder_positions', $form_obj, $form_type, $form_id);
return $output;
}