[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/form_builder/ -> form_builder_hooks.php (summary)

(no description)

File Size: 261 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 8 functions

  hook_form_builder_types()
  hook_form_builder_properties()
  hook_form_builder_validators()
  hook_form_builder_property_groups()
  hook_form_builder_preview_alter()
  hook_form_builder_add_element_alter()
  hook_form_builder_load()
  hook_form_builder_save()

Functions
Functions that are not part of a class:

hook_form_builder_types()   X-Ref
Define the fields and properties supported by a form type.

All modules that wish to create an configurable form need implement this hook. It
defines to Form Builder what types of fields the implementing module knows
how to modify. Within each field that is modifiable, the properties that
may be changed are also listed.

return:

hook_form_builder_properties($form_type)   X-Ref
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.

param: $form_type
return:

hook_form_builder_validators($form_type)   X-Ref
Define globally available #element_validate functions.

param: $form_type

hook_form_builder_property_groups($form_type)   X-Ref
Designate groups of properties. Displayed as tabs when editing a field.

Most properties will fall into one of the predefined categories created by
Form Builder, but it may be desired that some properties be split into
entirely different groups to separate them from other property options.

Form Builder provides the following groups by default:
- default: The "Properties" tab, used if no group is specified.
- hidden: Not displayed at all unless JavaScript is disabled.
- display: The "Display" tab. Use for properties that are purely cosmetic.
- options: The "Options" tab. Typically used for select list, radio,
or checkbox options.
- validation: The "Validation" tab. Use for properties or configuration
that enables validation functions on the element.

param: $form_type
return:

hook_form_builder_preview_alter(&$element, $form_type, $form_id)   X-Ref
Modify an individual element before it is displayed in the form preview.

This function is typically used to cleanup a form element just before it
is rendered. The most important purpose of this function is to filter out
dangerous markup from unfiltered properties, such as #description.
Properties like #title and #options are filtered by the Form API.

hook_form_builder_add_element_alter(&$element, $form_type, $form_id)   X-Ref
Modify an individual element before it is added to a new form.

This function may be helpful for setting a new element #key,
#form_builder['element_id'], or adjusting access in the
#form_builder['configurable'] and #form_builder['removable'] properties.

hook_form_builder_load($form_type, $form_id)   X-Ref
Take a Form API array and save settings for changed elements.

param: $form_type
param: $form_id

hook_form_builder_save(&$form, $form_type, $form_id)   X-Ref
Take a form builder array and save changes permanently.




Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7