You are here

function feeds_import_form in Feeds 6

Same name and namespace in other branches
  1. 8.2 feeds.pages.inc \feeds_import_form()
  2. 7.2 feeds.pages.inc \feeds_import_form()
  3. 7 feeds.pages.inc \feeds_import_form()

Render a feeds import form on import/[config] pages.

1 string reference to 'feeds_import_form'
feeds_menu in ./feeds.module
Implementation of hook_menu().

File

./feeds.pages.inc, line 51
Menu callbacks, form callbacks and helpers.

Code

function feeds_import_form(&$form_state, $importer_id) {
  $source = feeds_source($importer_id, empty($form['nid']['#value']) ? 0 : $form['nid']['#value']);
  $form = array();
  $form['#importer_id'] = $importer_id;

  // @todo Move this into fetcher?
  $form['#attributes']['enctype'] = 'multipart/form-data';
  $form['feeds'] = array(
    '#type' => 'fieldset',
    '#tree' => TRUE,
  );
  $form['feeds'] += $source
    ->configForm($form_state);
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Import'),
  );
  return $form;
}