function form_builder_get_element_properties in Form Builder 6
Given an element type, return properties that are supported by Form builder.
Parameters
$form_type: The type of form being edited (profile, node, webform, etc.)
$element_type: A the #type property of a FAPI element.
An associative array of properties supported for editing, keyed by: the property name and containing an array of the form, submit, and validate functions (if any).
2 calls to form_builder_get_element_properties()
- form_builder_field_configure in includes/
form_builder.admin.inc - Form for editing a field.
- form_builder_field_configure_submit in includes/
form_builder.admin.inc
File
- includes/
form_builder.api.inc, line 94 - form_builder.api.inc Universally used API functions within the Form builder module.
Code
function form_builder_get_element_properties($form_type, $element_type) {
// Get the list of all properties for this type.
$properties = form_builder_get_properties($form_type);
// Get the list of supported properties per field in this form type.
$form_type = form_builder_get_form_type($form_type);
$element_properties = array();
if (isset($form_type[$element_type]['properties'])) {
foreach ($form_type[$element_type]['properties'] as $property) {
if (isset($properties[$property])) {
$element_properties[$property] = $properties[$property];
}
}
}
return $element_properties;
}