function views_ui_add_display_form in Views (for Drupal 7) 6.2
Same name and namespace in other branches
- 6.3 includes/admin.inc \views_ui_add_display_form()
Form to add a display to a view.
2 string references to 'views_ui_add_display_form'
- template_preprocess_views_ui_edit_view in includes/
admin.inc - Preprocess the view edit page.
- views_ui_add_display in includes/
admin.inc - AJAX callback to add a display.
File
Code
function views_ui_add_display_form(&$form_state) {
$view =& $form_state['view'];
$form['display']['display'] = array(
'#type' => 'select',
'#options' => views_fetch_plugin_names('display'),
'#default_value' => 'page',
);
$form['display']['add_display'] = array(
'#type' => 'submit',
'#value' => t('Add display'),
'#submit' => array(
'views_ui_add_display_form_submit',
),
);
$form['#id'] = 'views-add-display-form';
$form['#attributes'] = array(
'class' => 'views-ajax-form',
);
$form['#action'] = url("admin/build/views/nojs/add-display/{$view->name}");
return $form;
}