Same name and namespace in other branches
- 5.x developer/hooks/core.php \hook_elements()
- 6.x developer/hooks/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
3 functions implement hook_elements()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- 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.module - Implementation of hook_elements().
File
- developer/
hooks/ core.php, line 206 - These are the hooks that are invoked by the Drupal core.
Code
function hook_elements() {
$type['filter_format'] = array(
'#input' => TRUE,
);
return $type;
}