You are here

function feeds_tamper_explode_form in Feeds Tamper 6

Same name and namespace in other branches
  1. 7 plugins/explode.inc \feeds_tamper_explode_form()
1 string reference to 'feeds_tamper_explode_form'
explode.inc in plugins/explode.inc

File

plugins/explode.inc, line 17

Code

function feeds_tamper_explode_form($importer, $element_key, $settings) {
  $form = array();
  $form['separator'] = array(
    '#type' => 'textfield',
    '#title' => t('String separator'),
    '#default_value' => isset($settings['separator']) ? $settings['separator'] : ',',
    '#description' => t('This will break up sequenced data into an array. For example, "a, b, c" would get broken up into the array(\'a\', \'b\', \'c\').
                        A space can be represented by %s, tabs by %t, and newlines by %n.'),
  );
  $form['limit'] = array(
    '#type' => 'textfield',
    '#title' => t('Limit'),
    '#default_value' => isset($settings['limit']) ? $settings['limit'] : '',
    '#description' => t('If limit is set and positive, the returned items will contain a maximum of limit with the last item containing the rest of string.
                        If limit is negative, all components except the last -limit are returned. If the limit parameter is zero, then this is treated as 1. If limit is not set, then there will be no limit on the number of items returned.'),
  );
  return $form;
}