You are here

function feeds_tamper_default_value_form in Feeds Tamper 7

Same name and namespace in other branches
  1. 6 plugins/default_value.inc \feeds_tamper_default_value_form()
1 string reference to 'feeds_tamper_default_value_form'
default_value.inc in plugins/default_value.inc

File

plugins/default_value.inc, line 16

Code

function feeds_tamper_default_value_form($importer, $element_key, $settings) {
  $form = array();
  $form['default_value'] = array(
    '#type' => 'textarea',
    '#title' => t('Value'),
    '#default_value' => isset($settings['default_value']) ? $settings['default_value'] : '',
    '#description' => t('This field will be set to the value specified.'),
  );
  $form['only_if_empty'] = array(
    '#type' => 'checkbox',
    '#title' => t('Only if empty'),
    '#default_value' => isset($settings['only_if_empty']) ? $settings['only_if_empty'] : 0,
    '#description' => t('This field will be set to the value specified only if the imported field is empty.'),
  );
  return $form;
}