function word_link_exchange_export_form in Word Link 7.2
Same name and namespace in other branches
- 8 modules/word_link_exchange/word_link_exchange.module \word_link_exchange_export_form()
- 7 modules/word_link_exchange/word_link_exchange.module \word_link_exchange_export_form()
Export taxonomy to word link form.
1 string reference to 'word_link_exchange_export_form'
- word_link_exchange_menu in modules/
word_link_exchange/ word_link_exchange.module - Implements hook_menu().
File
- modules/
word_link_exchange/ word_link_exchange.module, line 430 - Code for the Word link exchange module.
Code
function word_link_exchange_export_form() {
$form = array();
$delimiter = array(
'semicolon' => t('« ; » (Semicolon)'),
'comma' => t('« , » (Comma)'),
'tabulation' => t('« » (Tabulation)'),
'pipe' => t('« | » (Pipe)'),
'space' => t('« » (Space)'),
'currency_sign' => t('« ¤ » (Currency sign)'),
'custom_delimiter' => t('Custom delimiter'),
);
$line_ending = array(
'unix' => t('Unix / Linux'),
'mac' => t('Apple Mac'),
'ms' => t('Microsoft DOS'),
);
$form['export'] = array(
'#type' => 'fieldset',
'#title' => t('Export to CSV file'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['export']['delimiter'] = array(
'#type' => 'select',
'#title' => t('Delimiter'),
'#options' => $delimiter,
);
$form['export']['delimiter_custom'] = array(
'#type' => 'textfield',
'#title' => 'Custom delimiter',
'#size' => 2,
'#maxlength' => 1,
'#description' => t('Specify your custom delimiter.'),
'#states' => array(
'visible' => array(
':input[name=delimiter]' => array(
'value' => 'custom_delimiter',
),
),
),
);
$form['export']['line_ending'] = array(
'#type' => 'select',
'#title' => t('Line ending'),
'#options' => $line_ending,
'#description' => t('Choose the end of line to use.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Export'),
);
return $form;
}