You are here

function getlocations_element_search_distance in Get Locations 7

Same name and namespace in other branches
  1. 7.2 getlocations.module \getlocations_element_search_distance()

Parameters

string $default:

string $title:

string $description:

Return value

Returns form element

3 calls to getlocations_element_search_distance()
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_search_form in modules/getlocations_search/getlocations_search.module
The search form
_getlocations_search_settings_form in modules/getlocations_search/getlocations_search.admin.inc

File

./getlocations.module, line 6463
getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_element_search_distance($default, $title = '', $description = '') {
  if (empty($title)) {
    $title = t('Distance');
  }
  $element = array(
    '#type' => 'textfield',
    '#title' => $title,
    '#default_value' => $default,
    '#size' => 10,
    '#required' => TRUE,
  );
  if (!empty($description)) {
    $element['#description'] = $description;
  }
  return $element;
}