function feeds_tamper_truncate_text_form in Feeds Tamper 7
Same name and namespace in other branches
- 6 plugins/truncate_text.inc \feeds_tamper_truncate_text_form()
1 string reference to 'feeds_tamper_truncate_text_form'
- truncate_text.inc in plugins/
truncate_text.inc
File
- plugins/
truncate_text.inc, line 17
Code
function feeds_tamper_truncate_text_form($importer, $element_key, $settings) {
$form = array();
$form['num_char'] = array(
'#type' => 'textfield',
'#title' => t('Number of characters'),
'#default_value' => isset($settings['num_char']) ? $settings['num_char'] : '',
'#description' => t('The number of characters the text will be limited to.'),
);
$form['ellipses'] = array(
'#type' => 'checkbox',
'#title' => t('Ellipses'),
'#default_value' => isset($settings['ellipses']) ? $settings['ellipses'] : FALSE,
'#description' => t('Add ellipses (...) to the end of the truncated text.'),
);
$form['wordsafe'] = array(
'#type' => 'checkbox',
'#title' => t('Truncate on a word boundary'),
'#default_value' => isset($settings['wordsafe']) ? $settings['wordsafe'] : FALSE,
'#description' => t('Attempt to truncate on a word boundary.'),
);
return $form;
}