You are here

function getlocations_google_places_form in Get Locations 7

Same name and namespace in other branches
  1. 7.2 getlocations.module \getlocations_google_places_form()
1 call to getlocations_google_places_form()
getlocations_map_display_options_form in ./getlocations.module
Function

File

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

Code

function getlocations_google_places_form($defaults, $config) {

  // search_places
  $form = array();

  // enable
  $desc = t('Provide a textfield to query Google Places Search.');
  if ($config) {
    $desc .= ' ' . t('This will be enabled for all Google maps if enabled here.');
  }
  $form['search_places'] = getlocations_element_map_checkbox(t('Enable Google Places Search'), $defaults['search_places'], $desc);
  $form['search_places']['#suffix'] = '<div id="wrap-getlocations-search-places">';

  // size
  $form['search_places_size'] = getlocations_element_map_tf(t('Textbox width'), $defaults['search_places_size'], t('The width of the Google Places Search textbox. Must be a positive number.'), 10, 10, TRUE);

  // placement
  $pos = array(
    'outside_above' => t('Above the map'),
    'outside_below' => t('Below the map'),
  );
  $form['search_places_position'] = getlocations_element_dd(t('Textbox Position'), $defaults['search_places_position'], $pos, t('The position of the Google Places Search textbox.'));

  // label
  $form['search_places_label'] = getlocations_element_map_tf(t('Textbox label'), $defaults['search_places_label'], t('The label for the Google Places Search textbox.'), 30, 40);

  // placeholder
  $form['search_places_placeholder'] = getlocations_element_map_tf(t('Text in Textbox'), $defaults['search_places_placeholder'], t('The text inside the Google Places Search textbox. Leave empty for the default.'), 30, 40);

  // list
  $form['search_places_list'] = getlocations_element_map_checkbox(t('Provide a List of what was found linked to a bubble'), $defaults['search_places_list']);

  // dropdown
  $form['search_places_dd'] = getlocations_element_map_checkbox(t('Provide a Dropdown instead of a Textbox for Google Places Search'), $defaults['search_places_dd']);
  $form['search_places_dd']['#suffix'] = '</div>';
  return $form;
}