function form_builder_webform_form_builder_load in Form Builder 6
Implements hook_form_builder_load().
Load a complete FAPI array based on a form type and ID.
File
- modules/
webform/ form_builder_webform.module, line 281 - Form Builder integration for the Webform module.
Code
function form_builder_webform_form_builder_load($form_builder_type, $form_builder_id) {
if ($form_builder_type == 'webform') {
// Webform identifies its forms by Node Id.
$nid = $form_builder_id;
$node = node_load($nid);
// Get the unfiltered version of the client form.
$form = array();
$form_state = array();
$form = webform_client_form($form_state, $node, array(), TRUE, FALSE);
// Perform final processing of the form, and return it.
$form += array(
'submitted' => array(),
);
form_builder_webform_load_process($form['submitted'], $node);
return $form['submitted'];
}
}