You are here

function feeds_tamper_truncate_text_form in Feeds Tamper 6

Same name and namespace in other branches
  1. 7 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.'),
  );
  return $form;
}