function shortcut_set_edit_form

Form callback: builds the form for editing the shortcut set name.

Parameters

$form: An associative array containing the structure of the form.

$form_state: An associative array containing the current state of the form.

object $shortcut_set: An object representing the shortcut set, as returned from shortcut_set_load().

Return value

An array representing the form definition.

See also

shortcut_set_edit_form_validate()

shortcut_set_edit_form_submit()

Related topics

1 string reference to 'shortcut_set_edit_form'
shortcut_menu in drupal/modules/shortcut/shortcut.module
Implements hook_menu().

File

drupal/modules/shortcut/shortcut.admin.inc, line 611
Administrative page callbacks for the shortcut module.

Code

function shortcut_set_edit_form($form, &$form_state, $shortcut_set) {
  $form['shortcut_set'] = array(
    '#type' => 'value',
    '#value' => $shortcut_set,
  );
  $form['title'] = array(
    '#type' => 'textfield',
    '#title' => t('Set name'),
    '#default_value' => $shortcut_set->title,
    '#maxlength' => 255,
    '#required' => TRUE,
    '#weight' => -5,
  );
  $form['actions'] = array(
    '#type' => 'actions',
  );
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
    '#weight' => 5,
  );
  return $form;
}