You are here

function feeds_tamper_form_feeds_ui_create_form_alter in Feeds Tamper 7

Implements hook_form_BASE_FORM_ID_alter().

File

feeds_tamper_ui/feeds_tamper_ui.module, line 156
Feeds Tamper UI - Defines the user interface for Feeds Tamper.

Code

function feeds_tamper_form_feeds_ui_create_form_alter(array &$form, array &$form_state) {

  // Only make these alterations if we're trying to clone a feed.
  if (arg(4) !== 'clone') {
    return;
  }

  // Add checkbox to clone tamper plugins.
  $form['clone_tamper_plugins'] = array(
    '#type' => 'checkbox',
    '#title' => t('Clone Tamper Plugins'),
    '#description' => t('Check this box if you also want to clone the Feeds Tamper plugins for this importer.'),
    '#weight' => 1,
  );

  // Give submit button a higher weight so it shows up under the checkbox.
  $form['submit']['#weight'] = 2;
  $form['#submit'][] = '_feeds_tamper_clone_tamper_plugins';
}