You are here

function feeds_tamper_required_form in Feeds Tamper 7

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

File

plugins/required.inc, line 16

Code

function feeds_tamper_required_form($importer, $element_key, $settings) {
  $form = array();
  $form['help'] = array(
    '#markup' => t('Make this field required. If it is empty, the feed item will not be saved.'),
  );
  $form['invert'] = array(
    '#type' => 'checkbox',
    '#title' => t('Invert filter'),
    '#default_value' => !empty($settings['invert']),
    '#description' => t('Inverting the filter will save items only if the field is empty.'),
  );
  $form['log'] = array(
    '#type' => 'checkbox',
    '#default_value' => !empty($settings['log']),
    '#title' => t('Log'),
    '#description' => t('Log to the Feed log and print a message when a required feed item is filtered.'),
  );
  return $form;
}