Skip to content
Snippets Groups Projects
Commit ff650bce authored by Brandon Bergren's avatar Brandon Bergren
Browse files

Change marker chooser to add an empty "Default" option if the element is not #required.

parent 3e8a0172
No related branches found
No related tags found
No related merge requests found
......@@ -761,7 +761,11 @@ function process_gmap_address($element) {
*/
function process_gmap_markerchooser($element) {
$element['#type'] = 'select';
$element['#options'] = gmap_get_marker_titles();
$options = gmap_get_marker_titles();
if (!isset($element['#required']) || !$element['#required']) {
$options = array('' => t('Default')) + $options;
}
$element['#options'] = $options;
$element += _element_info('select');
return $element;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment