Geolocation

Geolocation

The Geolocation feature in Zoho Forms allows form owners to collect the geographical location of form respondents. This feature is particularly useful for businesses that require location-based data, such as attendance tracking, service request submissions, or geofencing applications.

Enable the geolocation option to capture your respondent's location with the longitude and latitude coordinates when they submit your form. By default, this property remains disabled and no location data is captured.
Info
Location is personal data. It is an information that can help identify a natural person. In this regard we recommend that you clearly inform your users about why you require their location, and how will this data be used and processed downstream.  In the context of the GDPR  (General Data Protection Regulation), the Data Subjects (your users, here) have a right to informed so. 

How to enable Geolocation in Zoho Forms

To collect your form respondent's location details,
  1. Navigate to  Settings > Submissions & Storage GeolocationHere, you can choose to collect the location coordinates of your respondents when they submit your form by enabling the option.
  2. You can configure how the form behaves based on the user's location:
    1. From Any Location

      From any location


      1. The form can be accessed and submitted from any location, even if the location data is not detected. However, if the location data is detected, it will be automatically stored. This option is ideal when location data is optional, or when submissions from any region are allowed.
      2. You can enforce geolocation requirements by selecting the Allow form access/submission only if location is fetched option. When enabled, the form will only be accessible if the user's location is successfully detected.
      3. If the location cannot be fetched, users will see a custom error message. You can modify this error message to be displayed according to your needs.
        Notes
        Note: To ensure that geolocation data is captured when embedding the form, make sure the 'allow geolocation' attribute is enabled in the iframe/JavaScript code.
    2. Within a Geofence

      Within a geo-fence

      1. The form can only be accessed or submitted when the user is within a specified geographical area (geofence). A geofence is a virtual boundary that can be defined around a specific region. Users outside this boundary will not be able to submit the form. This option is recommended for businesses that need to limit submissions to a specific area.
      2. Once you select the Within a Geofence option, click Add Location. A map interface will appear, allowing you to define the geofence area. You can zoom in or out using the plus (+) or minus (–) buttons in the bottom-right corner to find the specific location you want to restrict form submissions to. Use the search bar  to enter the specific location for the geofence.
      3. After selecting a location, define the geofence's radius. You can adjust the radius value in miles or kilometers (select your preferred unit). Range: 1 to 1000 miles or kilometers,
      4. Once you have selected the location and defined the radius, review the area displayed on the map. This boundary represents the geofence within which the form can be accessed and submitted. Click Done.

        Select location and radius

      5. The Geofence Summary will display the selected area.
      6. To ensure that the location of each user who submits the form will be stored for record-keeping, enable the Collect and store the form respondent's location option. It is useful for verifying the authenticity of submissions, or analyzing geolocation-based data.
      7. You can customize the error message to be shown to users when their location cannot be fetched and the error message displayed when users attempt to submit the form from outside the defined geofence.
        Info
        Ensure compliance with privacy regulations regarding the collection of geolocation data by informing users how their data will be stored and used.
  3. Click Save.
Notes
Note: Allowing form submissions with a geo-fence is available only in our paid plans.

Embedding a Form with Geolocation data capture

When embedding a form with geolocation features, it’s essential to ensure that the form can access the user's location. This requires adding a specific attribute (allow="geolocation") to the iframe or JavaScript code used for embedding the form on your website. 

The allow="geolocation" attribute is a critical part of ensuring that your form can access and capture the user’s location when they try to fill it out. Without this attribute, the browser may block location access, leading to issues in collecting the respondent's geolocation or enforcing geo-restrictions.

  1. When embedding the form using an iframe, you need to add the allow="geolocation" attribute to the <iframe> tag.
    For example: <iframe src="https://forms.zohopublic.com/form-url" width="100%" height="600" frameborder="0" allow="geolocation"></iframe>
  2. To embed the form using JavaScript, make sure to include the following in the code.
    f.setAttribute("allow", "geolocation;");
Notes
Note:
  1. When you enable geolocation for a form, Zoho Forms automatically provides the necessary allow="geolocation" attribute in the iframe or JavaScript embed code. However, if you enable the geolocation feature after embedding the form, it is crucial to re-embed the form with the updated code that includes the geolocation attribute.
  2. In some instances, certain website builders may load the iframe or JavaScript code within multiple iframes. This can prevent the collection of location data. To resolve this, please reach out to your website builder provider for guidance on how to properly capture geolocation information.

Viewing Geolocation Details in All Entires

You can include certain additional columns in the All Entries section by clicking the horizontal ellipsis icon in the top-right corner and then clicking the Additional Fields option.
Include additional fields


In the Additional Fields popup, enable Submitters Location, Submitters Latitude, Submitters Longitude.

Select location, latitude, longitude

Viewing Geolocation Details in Reports

To view the location details in reports,

  1. Go to the Report of your Form. If you have not created a Report for the required form, create a new Report.
  2. In the Report Builder, click Show/Hide Columns and select Submitters Location, Submitters Latitude, Submitters Longitude.