You are here

function elements_elements in Elements 6

Same name and namespace in other branches
  1. 5 elements.module \elements_elements()

Implements hook_elements().

File

./elements.module, line 6

Code

function elements_elements() {
  $types['tableselect'] = array(
    '#input' => TRUE,
    '#js_select' => TRUE,
    '#multiple' => TRUE,
    '#process' => array(
      'form_process_tableselect',
    ),
    '#options' => array(),
    '#empty' => '',
  );
  $types['emailfield'] = array(
    '#input' => TRUE,
    '#size' => 60,
    '#maxlength' => 128,
    '#autocomplete_path' => FALSE,
    '#process' => array(
      'form_expand_ahah',
    ),
    '#value_callback' => 'form_type_textfield_value',
  );
  $types['searchfield'] = array(
    '#input' => TRUE,
    '#size' => 60,
    '#maxlength' => 128,
    '#autocomplete_path' => FALSE,
    '#process' => array(
      'form_expand_ahah',
    ),
    '#value_callback' => 'form_type_textfield_value',
  );
  $types['telfield'] = array(
    '#input' => TRUE,
    '#size' => 20,
    '#maxlength' => 64,
    '#autocomplete_path' => FALSE,
    '#process' => array(
      'form_expand_ahah',
    ),
    '#value_callback' => 'form_type_textfield_value',
  );
  $types['urlfield'] = array(
    '#input' => TRUE,
    '#size' => 80,
    '#maxlength' => 128,
    '#autocomplete_path' => FALSE,
    '#process' => array(
      'form_expand_ahah',
    ),
    '#value_callback' => 'form_type_textfield_value',
  );
  $types['numberfield'] = array(
    '#input' => TRUE,
    '#process' => array(
      'form_expand_ahah',
    ),
    '#value_callback' => 'form_type_textfield_value',
  );
  $types['rangefield'] = array(
    '#input' => TRUE,
    '#process' => array(
      'form_expand_ahah',
    ),
    '#value_callback' => 'form_type_textfield_value',
  );

  // Add placeholder support to textfields and textareas.
  $types['textfield'] = array(
    '#process' => array(
      'form_process_placeholder',
    ),
  );
  $types['textarea'] = array(
    '#process' => array(
      'form_process_placeholder',
    ),
  );
  $types['password'] = array(
    '#process' => array(
      'form_process_placeholder',
    ),
  );
  return $types;
}