Here's what you need to know:
What is the Location element?
The Location element is used to capture GPS data of the current geolocation when the element is engaged. The element captures GPS Location Data for Latitude, Longitude, Altitude, Speed (m/s), Horizontal Accuracy(m), Vertical Accuracy (m), and Time.
What is the Text element?
The Text element allows users type in up to 50 characters into a field on your form.
How do I parse location data?
To parse the data captured by the Location element, follow the instructions below.
STEP 1. Under the Location Element in your form, add a Text Element and name it accordingly. In this example, we've named it Longitude as that is the data we will be parsing.
IFORM TIP: In the Dynamic Value of Location widget put: my_location="". This will ensure that the location data will reset with each new record.
Note that my_location is the data column name of the Location Widget in this example.
STEP 2: In the Dynamic Value of the Text element, put: my_location.longitude. This is telling the element to pull in the Longitude value of the Location element above.
To parse out different location data, you can use the examples below:
- my_location.horizontalAccuracy (For iOS only)
- my_location.verticalAccuracy (For iOS only)
- my_location.accuracy (For Android only)
STEP 3: Test it out on your device.
Click on the Location element.
You'll see the location data has been parsed to the appropriate fields.
Use the below form package for an example of parsing location data.