function getlocations_element_dd in Get Locations 6
Same name and namespace in other branches
- 6.2 getlocations.module \getlocations_element_dd()
- 7.2 getlocations.module \getlocations_element_dd()
- 7 getlocations.module \getlocations_element_dd()
Parameters
string $default:
string $title:
array $options:
string $description:
bool $multiple:
int $weight:
Return value
Returns form element
1 call to getlocations_element_dd()
File
- ./
getlocations.module, line 1480 - Displays locations on a map. for Drupal 6 using version 3 googlemaps API
Code
function getlocations_element_dd($title, $default, $options, $description = '', $multiple = FALSE, $weight = '') {
$element = array(
'#type' => 'select',
'#title' => $title,
'#default_value' => $default,
'#options' => $options,
);
if ($description) {
$element['#description'] = $description;
}
if ($multiple) {
$element['#multiple'] = TRUE;
$element['#size'] = min(12, count($options));
}
if (is_numeric($weight)) {
$element['#weight'] = $weight;
}
return $element;
}