-
Myers_KyleAsked on March 28, 2025 at 5:09 PM
One of my forms includes and Address input form field.
I would like to use the form calculation widget to calculate the quantity of numerical values included within Address Line 1.
I.E. Address Line 1: 12345 5th Ave.
Form Calculation Widget Output: 5
Should I use the Count function to achieve this?
-
Aries JotForm SupportReplied on March 28, 2025 at 10:02 PM
Hi Kyle,
Thanks for reaching out to Jotform Support. Unfortunately, this is not possible using the count function. As a workaround, you will need to separate each part of the address using a short text element and add two Form Calculation widgets, then create a formula utilizing the floor and log10 functions. Note that this formula will count all the numbers entered in the field. Let me show you how to do it:
1. Click on the Add Element menu on the left side of the page and add a Short Text element and two Form Calculation widgets. under the Widgets tab
2. Click on the Wand icon beside the first Form Calculation widget and click on Add Field, select the Short Text field, and click on the Save button.
3. On the second Form Calculation widget, click on the Wand icon and create the formula. Here's how it looks like:
Here's the sample result:
Give it a try and let us know if you have any other questions.
-
Myers_KyleReplied on May 15, 2025 at 12:19 PM
Awesome Answer! Thanks.
One more question: Can you provide a similar example on how the Count Function is intended to be used?
-
Roi_OReplied on May 15, 2025 at 2:49 PM
Hi Kyle,
The count() function counts the selected options in Multiple Choice and Single Choice element. You can use the Form Calculation widget to calculate and display the output. Let me show you how:
1. Go to the Form Builder page, click on the Add Element button at the upper left to view the form elements.
2. On the Form Elements under the Basic tab, click on the Multiple Choice field to add into the form.
3. On the Form Elements, go to the Widgets tab, and then click on the Form Calculation widget to add.
The Form Calculation widget settings opens on the right. Let me walk you through on how to add the function and formula:
1. On the Widget Settings, click on the function icon below the number keys, and then select the function Count() to add.
2. Click inside the parenthesis of the function, click on the Add Field button, and then select the Multiple Choice field.
3. Make sure to click on the Save button to save the changes.
Results :
Let us know if you have any other questions.
-
Myers_KyleReplied on May 17, 2025 at 10:41 AM
I will use this a lot because I do not have to use Calculation Values in the Multiple Choice Properties for this to work.
Thanks again