function hook_form_builder_properties in Form Builder 7
Same name and namespace in other branches
- 6 form_builder.api.php \hook_form_builder_properties()
- 7.2 form_builder.api.php \hook_form_builder_properties()
Defined globally available Form API properties.
The hook_form_builder_properties() hook allows modules to define properties that are configurable within form elements. Properties defined by any module may be used inside of any form element, so unique property names are advised.
Typically, this hook only needs to implemented if your module also has an implementation of hook_elements(). In which case you would implement hook_form_builder_properties to inform Form Builder of the new properties that are configurable.
Parameters
$form_type: The type of form for which these properties apply. You may choose to ignore the value of this parameter if your properties apply globally to all forms.
Return value
An array of properties mapped to their configuration:
- 'class' (optional): Specifies the class that defines the property behavior. It defaults to the default 'property class' defined in @see hook_form_builder_form_types().
Additional parameters may be specified. Their semantics is defined and implemented by their property class. Usually the following keys may be used:
- 'form': Form callback that generates the form elements for configuring this property.
- 'validate': Array of validate callbacks.
- 'submit': Array of submit callbacks.
2 functions implement hook_form_builder_properties()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- form_builder_form_builder_properties in ./
form_builder.module - Implementation of hook_form_builder_properties().
- form_builder_webform_form_builder_properties in modules/
webform/ form_builder_webform.module - Implements hook_form_builder_properties().
1 invocation of hook_form_builder_properties()
File
- ./
form_builder.api.php, line 152 - These are the hooks that are invoked by Form Builder.
Code
function hook_form_builder_properties($form_type) {
return array(
'title' => array(
'form' => 'form_builder_property_title_form',
),
'description' => array(
'form' => 'form_builder_property_description_form',
),
'options' => array(
'form' => 'form_builder_property_options_form',
'submit' => array(
'form_builder_property_options_form_submit',
),
),
);
}