shortcut_set_edit_form

Versions
mediamosa-21
shortcut_set_edit_form($form, &$form_state, $shortcut_set)

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

See also

shortcut_set_edit_form_submit()

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.

Related topics

Code

modules/shortcut/shortcut.admin.inc, line 554

<?php
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' => 'container',
    '#attributes' => array('class' => array('form-actions')),
    '#weight' => 100,
  );
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
    '#weight' => 5,
  );

  return $form;
}
?>