function feeds_ui_create_form in Feeds 7
Same name and namespace in other branches
- 8.2 feeds_ui/feeds_ui.admin.inc \feeds_ui_create_form()
- 6 feeds_ui/feeds_ui.admin.inc \feeds_ui_create_form()
- 7.2 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 152 - Contains all page callbacks, forms and theming functions for Feeds administrative pages.
Code
function feeds_ui_create_form($form, &$form_state, $from_importer = NULL) {
drupal_add_js(drupal_get_path('module', 'feeds_ui') . '/feeds_ui.js');
$form = array();
$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,
'#attributes' => array(
'class' => array(
'feed-name',
),
),
);
$form['id'] = array(
'#type' => 'textfield',
'#title' => t('Machine name'),
'#description' => t('A unique identifier for this configuration. Example: rss_feed. Must only contain lower case characters, numbers and underscores.'),
'#required' => TRUE,
'#maxlength' => 128,
'#attributes' => array(
'class' => array(
'feed-id',
),
),
);
$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;
}