function galleria_form_optionset_add in Galleria 7
Form builder; Form for adding a new option set.
1 string reference to 'galleria_form_optionset_add'
- galleria_menu in ./
galleria.module - Implements hook_menu().
File
- includes/
galleria.admin.inc, line 39 - Administrative page callbacks for the galleria module.
Code
function galleria_form_optionset_add($form, &$form_state) {
$form['title'] = array(
'#type' => 'textfield',
'#maxlength' => '255',
'#title' => t('Title'),
'#description' => t('A human-readable title for this option set.'),
'#required' => TRUE,
);
$form['name'] = array(
'#type' => 'machine_name',
'#maxlength' => '255',
'#machine_name' => array(
'source' => array(
'title',
),
'exists' => 'galleria_optionset_exists',
),
'#required' => TRUE,
);
$form['actions'] = array(
'#type' => 'actions',
'submit' => array(
'#type' => 'submit',
'#value' => t('Create new option set'),
),
'cancel' => array(
'#type' => 'link',
'#title' => t('Cancel'),
'#href' => 'admin/config/media/galleria',
),
);
return $form;
}