function form_builder_get_element in Form Builder 6
Same name and namespace in other branches
- 7 includes/form_builder.api.inc \form_builder_get_element()
Function to retrieve a single element within a form structure.
If needing to retreive multiple elements at once, use form_builder_get_elements().
Parameters
$form: A complete hierarchical FAPI structure.
$element_id: The unique identifier for an element that is to be retrieved.
Return value
A single Form API element array.
See also
7 calls to form_builder_get_element()
- form_builder_cache_difference in includes/
form_builder.cache.inc - Compare the cached form with the original and return all changed elements.
- form_builder_cache_field_load in includes/
form_builder.cache.inc - Retrieve a single field from a form cache..
- form_builder_field_render in includes/
form_builder.admin.inc - Render a single field independent of other settings.
- form_builder_positions_submit in includes/
form_builder.admin.inc - Submit handler for the form_builder_positions form.
- form_builder_webform_get_component in modules/
webform/ form_builder_webform.module - Save the contents of a form component into Webform's database tables.
File
- includes/
form_builder.api.inc, line 155 - form_builder.api.inc Universally used API functions within the Form builder module.
Code
function form_builder_get_element(&$form, $element_id) {
$elements = form_builder_get_elements($form, array(
$element_id,
));
return isset($elements[$element_id]) ? $elements[$element_id] : FALSE;
}