You are here

function feeds_ui_create_form in Feeds 7.2

Same name and namespace in other branches
  1. 8.2 feeds_ui/feeds_ui.admin.inc \feeds_ui_create_form()
  2. 6 feeds_ui/feeds_ui.admin.inc \feeds_ui_create_form()
  3. 7 feeds_ui/feeds_ui.admin.inc \feeds_ui_create_form()

Create a new configuration.

Parameters

$form_state: Form API form state array.

$from_importer: FeedsImporter object. If given, form will create a new importer as a copy of $from_importer.

1 string reference to 'feeds_ui_create_form'
feeds_ui_menu in feeds_ui/feeds_ui.module
Implements hook_menu().

File

feeds_ui/feeds_ui.admin.inc, line 145
Contains all page callbacks, forms and theming functions for Feeds administrative pages.

Code

function feeds_ui_create_form($form, &$form_state, $from_importer = NULL) {
  $form['#from_importer'] = $from_importer;
  $form['name'] = array(
    '#type' => 'textfield',
    '#title' => t('Name'),
    '#description' => t('A natural name for this configuration. Example: RSS Feed. You can always change this name later.'),
    '#required' => TRUE,
    '#maxlength' => 128,
  );
  $form['id'] = array(
    '#type' => 'machine_name',
    '#required' => TRUE,
    '#maxlength' => 128,
    '#machine_name' => array(
      'exists' => 'feeds_ui_importer_machine_name_exists',
    ),
  );
  $form['description'] = array(
    '#type' => 'textfield',
    '#title' => t('Description'),
    '#description' => t('A description of this configuration.'),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Create'),
  );
  return $form;
}