function form_builder_get_elements in Form Builder 7
Same name and namespace in other branches
- 6 includes/form_builder.api.inc \form_builder_get_elements()
- 7.2 includes/form_builder.api.inc \form_builder_get_elements()
Retrieve multiple elements within a form structure.
Parameters
$form: A complete hierarchical FAPI structure.
$element_ids: An array of unique identifiers for elements that are to be retreived. These identifiers match against the special property "#form_builder['element_id']", which is not available in normal FAPI structures. It must be added by the respective module that is providing support for a certain field type.
For example, CCK provides a unique identifier for each field such as "field_my_name". This field name must be added to the form array as #form_builder['element_id'] = 'field_my_name' in CCK's implementation of hook_form_builder_load().
Return value
A single Form API element array.
File
- includes/
form_builder.api.inc, line 59 - form_builder.api.inc Universally used API functions within the Form builder module.
Code
function form_builder_get_elements(&$form, $element_ids) {
return FormBuilderFormBase::fromArray($form)
->getFormArray();
}