You are here

function getlocations_fields_element_tid_loc_field in Get Locations 7

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

Parameters

string $default:

bool $ctools:

Return value

Returns form element

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

Code

function getlocations_fields_element_tid_loc_field($default, $options, $ctools = TRUE) {
  $element = array(
    '#type' => 'select',
    '#title' => t('Location to use'),
    '#options' => $options,
    '#default_value' => $default,
    '#description' => t("Select which field to use as the origin. If the location supports multiple entries the first one will be used."),
  );
  if ($ctools) {
    $element['#dependency'] = array(
      'edit-options-origin' => array(
        'tid_arg',
      ),
    );
  }
  return $element;
}