function getlocations_fields_element_nid_arg in Get Locations 7
Same name and namespace in other branches
- 7.2 modules/getlocations_fields/getlocations_fields.functions.inc \getlocations_fields_element_nid_arg()
Parameters
string $default:
bool $ctools:
Return value
Returns form element
3 calls to getlocations_fields_element_nid_arg()
- getlocations_fields_handler_field_distance::extra_options_form in modules/
getlocations_fields/ handlers/ getlocations_fields_handler_field_distance.inc - Provide a form for setting options.
- getlocations_fields_handler_filter_distance::value_form in modules/
getlocations_fields/ handlers/ getlocations_fields_handler_filter_distance.inc - Options form subform for setting options.
- getlocations_fields_handler_sort_distance::extra_options_form in modules/
getlocations_fields/ handlers/ getlocations_fields_handler_sort_distance.inc - Provide a form for setting options.
File
- modules/
getlocations_fields/ getlocations_fields.functions.inc, line 181 - getlocations_fields.functions.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_fields_element_nid_arg($default, $options, $ctools = TRUE) {
$element = array(
'#type' => 'select',
'#title' => t('Node ID argument to use'),
'#options' => $options,
'#default_value' => $default,
'#description' => empty($options) ? t("Select which of the view's arguments to use as the node ID. The latitude / longitude of the first location of that node will be used as the origin. You must have added arguments to the view to use this option.") : t("Select which of the view's arguments to use as the node ID. The latitude / longitude of the first location of that node will be used as the origin."),
);
if ($ctools) {
$element['#dependency'] = array(
'edit-options-origin' => array(
'nid_arg',
),
);
}
return $element;
}