You are here

public function FeedsCSVParser::configForm in Feeds 6

Same name and namespace in other branches
  1. 7.2 plugins/FeedsCSVParser.inc \FeedsCSVParser::configForm()
  2. 7 plugins/FeedsCSVParser.inc \FeedsCSVParser::configForm()

Build configuration form.

Overrides FeedsConfigurable::configForm

File

plugins/FeedsCSVParser.inc, line 154

Class

FeedsCSVParser
Parses a given file as a CSV file.

Code

public function configForm(&$form_state) {
  $form = array();
  $form['delimiter'] = array(
    '#type' => 'select',
    '#title' => t('Default delimiter'),
    '#description' => t('Default field delimiter.'),
    '#options' => array(
      ',' => ',',
      ';' => ';',
      'TAB' => 'TAB',
    ),
    '#default_value' => $this->config['delimiter'],
  );
  $form['no_headers'] = array(
    '#type' => 'checkbox',
    '#title' => t('No headers'),
    '#description' => t('Check if the imported CSV file does not start with a header row. If checked, mapping sources must be named \'0\', \'1\', \'2\' etc.'),
    '#default_value' => $this->config['no_headers'],
  );
  return $form;
}