You are here

function widgets_set_add_form in Widgets 7

Form builder; Form for adding a new widget set.

See also

widgets_set_add_form_submit()

widgets_set_name_validate()

1 string reference to 'widgets_set_add_form'
widgets_menu in ./widgets.module
Implements hook_menu().

File

./widgets.admin.inc, line 443
Administration pages for widget settings.

Code

function widgets_set_add_form($form, &$form_state) {
  $form['name'] = array(
    '#type' => 'textfield',
    '#size' => '30',
    '#title' => t('Set name'),
    '#default_value' => '',
    '#description' => t('The name is used to identify the widget set in blocks, tokens and other displays. Use only lowercase alphanumeric characters, underscores (_), and hyphens (-).'),
    '#element_validate' => array(
      'widgets_set_name_validate',
    ),
    '#required' => TRUE,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Create new set'),
  );
  return $form;
}