You are here

function number_elements in Content Construction Kit (CCK) 6

Same name and namespace in other branches
  1. 6.3 modules/number/number.module \number_elements()
  2. 6.2 modules/number/number.module \number_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.

Includes a regex to check for valid values as an additional parameter the validator can use. The regex can be overridden if necessary.

File

modules/number/number.module, line 353
Defines numeric field types.

Code

function number_elements() {
  return array(
    'number' => array(
      '#input' => TRUE,
      '#columns' => array(
        'value',
      ),
      '#delta' => 0,
      '#process' => array(
        'number_process',
      ),
    ),
  );
}