You are here

function text_elements in Content Construction Kit (CCK) 6.3

Same name and namespace in other branches
  1. 6 examples/example_field.php \text_elements()
  2. 6 modules/text/text.module \text_elements()
  3. 6.2 modules/text/text.module \text_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.

Autocomplete_path is not used by text_widget but other widgets can use it (see nodereference and userreference).

File

modules/text/text.module, line 290
Defines simple text field types.

Code

function text_elements() {
  return array(
    'text_textfield' => array(
      '#input' => TRUE,
      '#columns' => array(
        'value',
      ),
      '#delta' => 0,
      '#process' => array(
        'text_textfield_process',
      ),
      '#autocomplete_path' => FALSE,
    ),
    'text_textarea' => array(
      '#input' => TRUE,
      '#columns' => array(
        'value',
        'format',
      ),
      '#delta' => 0,
      '#process' => array(
        'text_textarea_process',
      ),
      '#filter_value' => FILTER_FORMAT_DEFAULT,
    ),
  );
}