function optionwidgets_elements in Content Construction Kit (CCK) 6
Same name and namespace in other branches
- 6.3 modules/optionwidgets/optionwidgets.module \optionwidgets_elements()
- 6.2 modules/optionwidgets/optionwidgets.module \optionwidgets_elements()
Implementation of FAPI hook_elements().
Any FAPI callbacks needed for individual widgets can be declared here, and the element will be passed to those callbacks for processing.
Drupal will automatically theme the element using a theme with the same name as the hook_elements key.
File
- modules/
optionwidgets/ optionwidgets.module, line 96 - Defines selection, check box and radio button widgets for text and numeric fields.
Code
function optionwidgets_elements() {
return array(
'optionwidgets_select' => array(
'#input' => TRUE,
'#columns' => array(
'value',
),
'#delta' => 0,
'#element_validate' => array(
'optionwidgets_validate',
),
'#process' => array(
'optionwidgets_select_process',
),
),
'optionwidgets_buttons' => array(
'#input' => TRUE,
'#columns' => array(
'value',
),
'#delta' => 0,
'#element_validate' => array(
'optionwidgets_validate',
),
'#process' => array(
'optionwidgets_buttons_process',
),
),
'optionwidgets_onoff' => array(
'#input' => TRUE,
'#columns' => array(
'value',
),
'#delta' => 0,
'#element_validate' => array(
'optionwidgets_validate',
),
'#process' => array(
'optionwidgets_onoff_process',
),
),
);
}