PRO

Google Map Field

The Google Map field enables you to add one or more interactive maps to your form. The form user clicks on the map and the latitude and longitude of the map is stored in the submission.

Demo

Setup

The Google Map field requires:

To enter your key into WS Form:

  1. Click Settings from the WS Form admin menu.
WS Form - Admin Menu Settings
  1. Click the Advanced tab.
  2. Enter your API key into the API Key setting under Google.
  3. Click Save.

Once the key has been added and saved you can add the Google Map field to your form.

Adding a Google Map Field

To learn how to add, edit, clone, move, resize, offset, or delete a Google Map field, please click here.

Field Settings

To edit the settings for this field type, click the settings icon on the field itself. Click the Save & Close or Save button to save your changes. If you do not want to save your changes, you can click the Cancel button or click any other form element to close the field settings sidebar.

WS Form - Field Settings Icon

Basic

The basic tab contains settings that the majority of WS Form users will need to control a field. The settings are as follows:

Label

This is the label shown alongside the field. As well as entering a label into this field, you can also double click the label of the field in the editor. You should enter an easy-to-understand label for your field, for example ‘First Name’ or ‘Email’.

Show Label

If enabled the label will be shown on your form. If you do not want the label to appear for a particular field, uncheck this box.

Required

If checked, the Google Map field must be clicked on by the user.

Hidden

If checked the field will be hidden on the form. It can be shown again using conditional logic or your own JavaScript.

Help Text

The help text setting enables you to add smaller text under the field to assist the website visitor in completing that field.

WS Form variables can be entered into this field.

Map

Auto Center

The auto center setting can be used to automatically center the map to the users location. To enable this feature, choose one of the geolocation methods:

  • Browser Geolocation (Uses the location provided by the browser. More accurate but user is prompted to allow location sharing).
  • IP Geolocation (Less accurate. User is not prompted).

Both methods are processed client-side, no data is passed to the server to provide this functionality.

Latitude

Enter the default latitude for the map. This setting is used to position the map but does not set the position set by the user. It must be used in conjunction with the longitude setting.

Longitude

Enter the default longitude for the map. This setting is used to position the map but does not set the position set by the user. This setting must be used in conjunction with the latitude setting.

Zoom

Enter the default zoom level for the map. If you do not enter a value in this setting, it will be set to 14. This value typically ranges from 1 – 20 but some areas of the world allow for higher zoom levels.

Type

There are four different types of map you can choose from:

  • Road Map
  • Satellite
  • Hybrid (A combination of road map and satellite)
  • Terrain

Use this setting to choose the type of map you want to display.

Search Field

It is possible to use a field such as a text field as an address search field. The address search field can be used to enter a zip or full address to find a location on the map. Simply add a text field to your form (e.g. above the map) and then use this setting to select that field.

Controls

Map Type

Enable or disable the map type control on the map.

Full Screen

Enable or disable the full screen control on the map.

Street View

Enable or disable the street view control on the map.

Zoom

Enable or disable the zoom control on the map.

Marker

The marker indicates where the user has clicked on the map.

Icon Title

Enter the title for the marker, e.g. ‘Selected location’.

Icon URL

Enter a URL or a base 64 encoded data string into this setting to change the marker icon.

Accessibility

ARIA Label

Accessible Rich Internet Applications (ARIA) defines ways to make web content and web applications more accessible to people with disabilities.

This setting enables you to define what text is made available to ARIA applications. This would, for example, provide a screen reader with specific text to read to someone with a disability.

The value of this setting defaults to your field label. If you would like to change this, enter a new value.

WS Form variables can be entered into this field.

Exclusions

Exclude From Emails

By default, WS Form uses the #email_submission variable in email templates. This provides a simple way of displaying all of the submitted fields in emails. Sometimes there might be a need to exclude a field from an email, for example, you might want to not include some introductory copy on a form, or hide a field you’re using with conditional logic to show or hide an element.

To hide a field from emails, check this box.

Other WS Form integrations may add exclusions in this section too, such as the WooCommerce integration which allows you to exclude certain fields from the cart entries.

Hidden Behavior

Always Include in Actions

This setting allows you to change the behavior of a field if the hidden setting is checked (See above), or if you set a field as hidden using conditional logic.

The normal behavior for a field that has been hidden is that it will not be included if an action has a ‘Clear Hidden Fields’ setting enabled. For example, if you have a ‘Send Email‘ action, WS Form will not include fields that are hidden.

If this setting is checked, this field will always be included in actions if it is hidden.