Table of Contents

How to Automatically Capture a User’s Location on a Form

Sarto Jama Updated by Sarto Jama

Scenario

Forms work well for capturing information from any user. But mistakes can happen when entering information that creates more work for you!

For example, let’s say you offer your customers on-site services for the equipment they’ve purchased. You’ve noticed that in the last few requests the service location has been incorrect. For one request that resulted in your team getting to the customer 2 hours later than expected.

You could set up a new process for verifying service locations, or you could capture those locations automatically. No user input required.

Here’s what the process would look like for your customer:

Requirements

You will need an Address field in your object, and that has "Geolocate Records" enabled, in order to capture a user's location.

Geolocation and maps are available on the Pro plan and above.

If this your first time creating an app, you'll need to know some basics about adding objects, fields, pages, and views. You can start by reading our Builder Basics section

Other good resources can be found in our designing the database and building pages sections of the knowledge base.

Steps

Select the Page with the Form

In the Pages section of the builder, select the page that holds the form you want to use to capture the user’s location.

Open the Form Editor

Click on the form on that page to open the editor.

Go to Record Rules

Go to the Rules section of the form editor and then click on the Record Rules option:

Add the Record Rule

Click the “Add Rule” button and use the following settings for your record rule:

  • Action Update this record
  • When leave blank (unless you only want to capture the location under specific circumstances)
  • Values Set {select your Address field} to the user’s current location
This will work for Address fields with either the Address or Latitude/Longitude input type:

Notes and Troubleshooting

  • If on mobile, location detection must be enabled on the device.
  • The app must be accessed securely using HTTPS to allow for location detection in the browser. 

 

How did we do?

How to Limit an Uploaded File’s Size

How to Allow Users to Add New Options in Forms

Contact