You are here

function creditfield_element_info in Creditfield Form Element 7

Implements hook_element_info().

Return value

array

File

./creditfield.module, line 9

Code

function creditfield_element_info() {
  $types['creditfield_cardnumber'] = array(
    '#input' => TRUE,
    '#element_validate' => array(
      'creditfield_cardnumber_validate',
    ),
    '#autocomplete_path' => FALSE,
    '#process' => array(
      'form_process_creditfield',
    ),
    '#theme' => 'textfield',
    '#theme_wrappers' => array(
      'form_element',
    ),
    '#maxlength' => 16,
  );
  $types['creditfield_date'] = array(
    '#input' => TRUE,
    '#element_validate' => array(
      'creditfield_date_validate',
    ),
    '#process' => array(
      'form_process_creditfield_date',
    ),
    '#theme' => 'date',
    '#theme_wrappers' => array(
      'form_element',
    ),
  );
  $types['creditfield_cvv'] = array(
    '#input' => TRUE,
    '#element_validate' => array(
      'creditfield_cvv_validate',
    ),
    '#autocomplete_path' => FALSE,
    '#process' => array(
      'form_process_creditfield',
    ),
    '#theme' => 'textfield',
    '#theme_wrappers' => array(
      'form_element',
    ),
    '#maxlength' => 4,
  );
  return $types;
}