function form_builder_unset_element in Form Builder 7
Same name and namespace in other branches
- 6 includes/form_builder.api.inc \form_builder_unset_element()
Unset an element within a form structure.
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 85 - form_builder.api.inc Universally used API functions within the Form builder module.
Code
function form_builder_unset_element(&$form, $element_id) {
$form_obj = FormBuilderFormBase::fromArray($form);
$r = $form_obj
->unsetElement($element_id);
$form = $form_obj
->getFormArray();
return $r;
}