February 22nd, 2016

Capture where someone filled out your form: Geolocation for SecureForm Form Builder

A nurse from your company visits a patient at his/her home and, as part of the process, has to fill out and submit an electronic form describing the visit while there. Capturing the nurse’s exact location (without the need to trust the nurse) when she or he fills out that form is a critical check that the patient received proper care—at the right time and place. This not only protects against nurses lying about their whereabouts, but it also defends you against patients who claim the nurse was not there at a specific time.


Geolocation is the ability for phone, tablet, and some laptops to know exactly where you are in the world (for example, through GPS or other means). This feature is visible in modern Web browsers so that Web pages can query the user’s device to find out the device’s current latitude and longitude and that can translate it into the approximate street address (assuming the location is close to some street address).

What about privacy?

Knowing someone’s location is very handy, but it does trigger our privacy response. Is that good information to capture? Is that an invasion of privacy? It turns out that the privacy issue is not as big a concern as it first appears. Why? In order for a form to capture the user’s geographic location, it has to ask the browser. All Web browsers then ask the end user whether it’s OK to share the physical location with the form. If the user says “no,” then the bowser can’t collect any location data. Sharing location data is strictly “opt in.”

Additionally, you can consider who you’re asking to fill out the forms. If they’re your employees, you justifiably require them to allow the browser to capture their location data. If it’s a customer whose physical location you require or you find useful in order to serve them, then it isn’t unreasonable to request but not require that they provide the info. For instance, searching for restaurants on Yelp! may prompt the site to ask you to share your location so that it can find restaurants near you quickly and easily.

If your Web form has collected someone’s physical location, you should ensure that information transmits and saves securely since it can identify the person. In the context of HIPAA, a street address together with medical information equals Protected Health Information (even if there are no names mentioned). You must properly safeguard the data.

Geolocation in SecureForm Form Builder

FormBuilder is the component of SecureForm that enables you to visually build and securely host your Web form in LuxSci. The FormBuilder’s toolbar now contains a “globe” tool which, when pressed, inserts geolocation capturing code into your form. So, once you save the form and someone fills it out and submits it, you’ll start receiving the following additional data (when it’s permitted and can be determined):

  1. Latitude
  2. Longitude
  3. Full physical address
  4. Address street number
  5. Address street name
  6. Address city
  7. Address state or province (short code: MA for Massachusetts, for instance)
  8. Address postal code
  9. Address country (short code: US for the United States, for example)

These fields will remain blank if the information isn’t available. Additionally, you can write custom JavaScript code that interacts with this system and allows you to perform other actions (such as use this data to prefill other form fields, execute your own API calls, etc.) if/when the geolocation data is determined.

Want to give it a try?  Get a SecureForm trial account.

Leave a Comment

You must be connected or logged in to post a comment. This is to reduce spam comments.

If you have not previously commented, you can connect using existing social media account, or register with a new username and password.