function shortcut_set_edit_form

shortcut_set_edit_form($form, &$form_state, $shortcut_set)

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

File

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!shortcut!shortcut.admin.inc/function/shortcut_set_edit_form/7.x