Form Builder Built-In Functions
Table of Contents
- What are the built-in functions?
- What are the built-in functions for location data?
- How do I add the built-in functions to my form?
WHAT ARE the BUILT-IN FUNCTIONS?
Built-in functions are default variables available to be used throughout your forms. They can capture the username of the person filling out the form, the first and last name of the user, their email address, OS type, or, as in this case, location information straight from the location data provided by the device.
What are the built-in functions for location data?
By placing iFormBuilder's built-in functions into the Dynamic Value of an element, you can automatically capture a user's location data. The following is a list of the location data that can be captured.
- iformbuilder.location.latitude: This function will return the latitude data.
- iformbuilder.location.longitude: This function will return the longitude data.
- iformbuilder.location.altitude: This function will return the altitude data.
- iformbuilder.location.speed: This function will return the speed data.
- iformbuilder.location.accuracy: This function will return the accuracy data.
- iformbuilder.location.horizontalAccuracy: This function will return the horizontal accuracy data.
- iformbuilder.location.verticalAccuracy: This function will return the vertical accuracy data.
- iformbuilder.location.time: This function will return the time data.
- iformbuilder.location.string: This function will return all location data in one string.
PLEASE NOTE: The form package at the bottom of the page is filled with examples of how to implement each.
How do I add the built-in functions to my form?
To use the above built-in functions on your form, please read the instructions below.
PLEASE NOTE: In this example, we'll be using an if/else statement to populate the location data based on an answer the user provides.
STEP 1. With your form loaded in the Form Builder, add a Select element with a Yes or No Option List.
In this example, the data column name of the Select element is choose__yes__to_autopopulate_location.
STEP 2. Underneath the Select element, add a Location element.
STEP 3. In the Dynamic Value field of the Location element, put the following syntax:
if(choose__yes__to_autopopulate_location==0){iformbuilder.location.string} else{""}
This syntax says if the user selects "Yes" in the first question to populate the Location element with data and if the select "No" to leave the element blank.
STEP 4. Save your form.
STEP 5. Test the functionality out on your form.
Download these form packages for examples on how to use each of the functions as well as the dynamic example above.
Comments
0 comments
Please sign in to leave a comment.