function form_builder_set_element in Form Builder 7
Same name and namespace in other branches
- 6 includes/form_builder.api.inc \form_builder_set_element()
Set an element within a form structure.
Return value
TRUE if an element was updated, FALSE if it was not found.
Deprecated
Deprecated since 1.8 and will be removed in 2.0. Use the FormBuilderElement class instead of the info-arrays.
File
- includes/
form_builder.api.inc, line 72 - form_builder.api.inc Universally used API functions within the Form builder module.
Code
function form_builder_set_element(&$form, $element, &$entire_form = NULL, $parent_id = FORM_BUILDER_ROOT) {
$form_obj = FormBuilderFormBase::fromArray($form);
$r = $form_obj
->setElementArray($element);
$form = $form_obj
->getFormArray();
return $r;
}