Community Documentation

hook_elements

5 core.php hook_elements()
6 core.php hook_elements()

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

Return value

An array of element types

Related topics

▾ 4 functions implement hook_elements()

example_element_elements in developer/examples/example_element.module
Implementation of hook_elements().
format_xml_elements in includes/common.inc
Format XML elements.
multipage_form_example_elements in developer/examples/multipage_form_example.module
Playing around here with a new form element to enable storing hidden values in an array fashion. Seems to work fine. Check out $form['test_hidden_array'] above for how to structure the form element
system_elements in modules/system/system.module
Implementation of hook_elements().

File

developer/hooks/core.php, line 213
These are the hooks that are invoked by the Drupal core.

Code

<?php
function hook_elements() {
  $type['filter_format'] = array('#input' => TRUE);
  return $type;
}
?>
Login or register to post comments