You are here

function styles_ui_preset_add_form in Styles 6

Same name and namespace in other branches
  1. 6.2 contrib/styles_ui/includes/styles_ui.admin.inc \styles_ui_preset_add_form()
  2. 7 contrib/styles_ui/styles_ui.admin.inc \styles_ui_preset_add_form()

Page callback for adding a styles preset.

1 string reference to 'styles_ui_preset_add_form'
styles_ui_menu in contrib/styles_ui/styles_ui.module
Implementation of hook_menu().

File

contrib/styles_ui/includes/styles_ui.admin.inc, line 44
styles/contrib/styles_ui/includes/styles_ui.admin.inc Administrative page callbacks for the Styles UI module.

Code

function styles_ui_preset_add_form($form, $form_state, $field_type) {
  $form = array();
  $form['field_type'] = array(
    '#type' => 'value',
    '#value' => $field_type,
  );
  $form['preset_name'] = array(
    '#type' => 'textfield',
    '#title' => t('Preset name'),
    '#description' => t('Enter the name of your desired preset, which must be a unique name containing only alphanumeric characters and underscores.'),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );
  return $form;
}