You are here

function getlocations_fields_element_tid_arg in Get Locations 7.2

Same name and namespace in other branches
  1. 7 modules/getlocations_fields/getlocations_fields.functions.inc \getlocations_fields_element_tid_arg()

Parameters

string $default:

bool $ctools:

Return value

Returns form element

3 calls to getlocations_fields_element_tid_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 273
getlocations_fields.functions.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_fields_element_tid_arg($default, $options, $ctools = TRUE) {
  $element = array(
    '#type' => 'select',
    '#title' => t('Term ID argument to use'),
    '#options' => $options,
    '#default_value' => $default,
    '#description' => empty($options) ? t("Select which of the view's arguments to use as the term ID. The latitude / longitude of the first location of that term 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 term ID. The latitude / longitude of the first location of that term will be used as the origin."),
  );
  if ($ctools) {
    $element['#dependency'] = array(
      'edit-options-origin' => array(
        'tid_arg',
      ),
    );
  }
  return $element;
}