function getlocations_fields_element_opts in Get Locations 7
Same name and namespace in other branches
- 7.2 modules/getlocations_fields/getlocations_fields.functions.inc \getlocations_fields_element_opts()
Parameters
string $title:
string $default:
string $description:
Return value
Returns form element
1 call to getlocations_fields_element_opts()
- getlocations_fields_input_settings_form in modules/
getlocations_fields/ getlocations_fields.module - input settings form for sharing
File
- modules/
getlocations_fields/ getlocations_fields.functions.inc, line 393 - getlocations_fields.functions.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_fields_element_opts($title, $default, $description = '') {
$element = array(
'#type' => 'select',
'#title' => $title,
'#default_value' => $default,
'#options' => array(
'0' => t('Normal'),
'1' => t('Required'),
'2' => t('Read only'),
'3' => t('Display only'),
'4' => t('Hidden'),
),
);
if (!empty($description)) {
$element['#description'] = $description;
}
return $element;
}