function layout_admin_region_edit_form in Layout 7
Region editing and addition form.
See also
layout_admin_region_edit_form_submit()
1 string reference to 'layout_admin_region_edit_form'
- layout_admin_region_edit in ./
layout.admin.regions.inc - Page callback for region addition and editing.
File
- ./
layout.admin.regions.inc, line 215 - Responsive layout builder tool administration interface for regions.
Code
function layout_admin_region_edit_form($form, $form_state, $region) {
$form['admin_title'] = array(
'#title' => t('Region label'),
'#description' => t('Name of the region visible in the layout editor.'),
'#type' => 'textfield',
'#default_value' => $region->admin_title,
'#required' => TRUE,
);
$form['name'] = array(
'#title' => t('Region machine name'),
'#type' => 'machine_name',
'#maxlength' => 32,
'#machine_name' => array(
'exists' => 'layout_region_load',
'source' => array(
'admin_title',
),
),
'#default_value' => $region->name,
'#description' => t('The region machine name is used to identify the region in layouts, when assigning panes and to apply CSS classes to the region.'),
);
$form['default'] = array(
'#title' => t('In default layout'),
'#description' => t('If checked, the region will appear in the default layout when editing new layouts. This setting will not affect existing layouts.'),
'#type' => 'checkbox',
'#default_value' => !$region->custom,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save region'),
);
return $form;
}