iFormBuilder Smart Controls
- What are Dynamic Values?
- How do Dynamic Values apply in a real-world scenario?
- How do I add Dynamic Values to an element?
What are Dynamic Values?
How does this apply to a real-world scenario?
Real-world scenarios are important since, well, that's where you'll be using them. So say you have three different number elements on your form, and in a fourth element, you want to add the previous three together. You can use Dynamic Values to add those fields together and populate the fourth element with that total.
How do I add dynamic values to an element?
To add a dynamic value to an element on your form, please follow the instructions below.
STEP 1. With your form loaded in the Form Builder, highlight the first element that will be used in your calculation, and scroll down to the Smart Controls section.
STEP 2. In the Dynamic Value field, place the following:
In this example the data column name of our element is number_1. Setting it to 0 ensures that element will reset the value with each new record created.
STEP 3. Repeat Step 2 for each of the elements used in the calculation. Failure to do so will cause the calculation to fail. Be sure to change the data column name in each Dynamic Value to match the data column name of the element you currently have highlighted.
STEP 4. In the Dynamic Value of the element that will be performing the calculation, put the following:
This is telling the element to add up the previous three elements.
STEP 5. Save your form.
STEP 6. Test the functionality on your device.
You'll see the fourth element (Total) is populated with the calculation.
As a reference, please download this form package and upload it to your profile. It will allow you to see the form in action.
Please sign in to leave a comment.