function getlocations_fields_element_weight in Get Locations 7
Same name and namespace in other branches
- 7.2 modules/getlocations_fields/getlocations_fields.functions.inc \getlocations_fields_element_weight()
Parameters
string $title:
string $default:
string $description:
Return value
Returns form element
1 call to getlocations_fields_element_weight()
- 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 367 - getlocations_fields.functions.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_fields_element_weight($title, $default, $description = '') {
$options = array(
'' => '',
);
$options += drupal_map_assoc(range(-50, 50));
$element = array(
'#type' => 'select',
'#title' => $title,
'#default_value' => $default,
'#options' => $options,
);
if (!empty($description)) {
$element['#description'] = $description;
}
return $element;
}