function boxes_add_form in Boxes 6
Same name and namespace in other branches
- 7 boxes.admin.inc \boxes_add_form()
Generate form for creating new boxes.
1 string reference to 'boxes_add_form'
- boxes_menu in ./
boxes.module - Implementation of hook_menu().
File
- ./
boxes.admin.inc, line 6
Code
function boxes_add_form($form_state, $plugin_key) {
$form = boxes_box_form(array(
'box' => boxes_factory($plugin_key),
));
$form['delta'] = array(
'#type' => 'textfield',
'#title' => t('Machine name'),
'#description' => t('Lowercase letters, numbers and underscores only'),
'#required' => true,
'#element_validate' => array(
'boxes_validate_delta',
),
'#size' => 32,
'#maxlength' => 32,
'#weight' => -1,
);
$form['submit']['#attributes']['class'] = '';
return $form;
}