Extracting Numeric Values from Address Fields

  • Myers_Kyle
    Asked 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 Support
    Replied 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

    Extracting Numeric Values from Address Fields Image 1 Screenshot 60

    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.

    Extracting Numeric Values from Address Fields Image 2 Screenshot 71

    3. On the second Form Calculation widget, click on the Wand icon and create the formula. Here's how it looks like:

    Extracting Numeric Values from Address Fields Image 3 Screenshot 82

    Extracting Numeric Values from Address Fields Image 4 Screenshot 93

    Here's the sample result:

    Extracting Numeric Values from Address Fields Image 5 Screenshot 104

    Give it a try and let us know if you have any other questions.

  • Myers_Kyle
    Replied 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_O
    Replied 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.

    Extracting Numeric Values from Address Fields Image 1 Screenshot 60

    2. On the Form Elements under the Basic tab, click on the Multiple Choice field to add into the form.

    Extracting Numeric Values from Address Fields Image 2 Screenshot 71

    3. On the Form Elements, go to the Widgets tab, and then click on the Form Calculation widget to add.

    Extracting Numeric Values from Address Fields Image 3 Screenshot 82

    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.

    Extracting Numeric Values from Address Fields Image 4 Screenshot 93

    Results :

    Extracting Numeric Values from Address Fields Image 5 Screenshot 104 This will count how many of the specified Multiple Choice fields have at least one option selected.

    Let us know if you have any other questions.

  • Myers_Kyle
    Replied 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