function hook_element_info


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 system.api.php hook_element_info()
cle7 system.api.php hook_element_info()
elmsmedia7 system.api.php hook_element_info()
icor7 system.api.php hook_element_info()
meedjum_blog7 system.api.php hook_element_info()
mooc7 system.api.php hook_element_info()

Allows modules to declare their own Form API element types and specify their default values.

This hook allows modules to declare their own form element types and to specify their default values. The values returned by this hook will be merged with the elements returned by hook_form() implementations and so can return defaults for any Form APIs keys in addition to those explicitly mentioned below.

Each of the form element types defined by this hook is assumed to have a matching theme function, e.g. theme_elementtype(), which should be registered with hook_theme() as normal.

For more information about custom element types see the explanation at

Return value

An associative array describing the element types being defined. The array contains a sub-array for each element type, with the machine-readable type name as the key. Each sub-array has a number of possible attributes:

  • "#input": boolean indicating whether or not this element carries a value (even if it's hidden).
  • "#process": array of callback functions taking $element, $form_state, and $complete_form.
  • "#after_build": array of callback functions taking $element and $form_state.
  • "#validate": array of callback functions taking $form and $form_state.
  • "#element_validate": array of callback functions taking $element and $form_state.
  • "#pre_render": array of callback functions taking $element and $form_state.
  • "#post_render": array of callback functions taking $element and $form_state.
  • "#submit": array of callback functions taking $form and $form_state.
  • "#title_display": optional string indicating if and how #title should be displayed, see theme_form_element() and theme_form_element_label().

See also



Related topics

21 functions implement hook_element_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

contextual_element_info in modules/contextual/contextual.module
Implements hook_element_info().
date_api_element_info in sites/all/modules/ulmus/date/date_api/date_api.module
Implements hook_element_info().
date_element_info in sites/all/modules/ulmus/date/date.module
Implements hook_element_info().
date_popup_element_info in sites/all/modules/ulmus/date/date_popup/date_popup.module
Implements hook_element_info().
date_repeat_element_info in sites/all/modules/ulmus/date/date_repeat/date_repeat.module
Implements hook_element_info().

... See full list

2 invocations of hook_element_info()
devel_elements_page in sites/all/modules/ulmus/devel/
element_info in includes/
Retrieves the default properties for the defined element type.


modules/system/system.api.php, line 684
Hooks provided by Drupal core and the System module.


function hook_element_info() {
  $types['filter_format'] = array(
    '#input' => TRUE,
  return $types;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.