Populate a numerical field based on a dropdown choice

  • Profile Image
    Asked on February 09, 2014 at 02:52 PM

    A user would select a breed of dog, the numerical field would show a value based on the breed chosen. Is this possible?

  • Profile Image
    Answered on February 09, 2014 at 04:30 PM


    That's possible when you try this workaround.

    1. On your breed options in a dropdown field, include the numbers on each of the breed names.


    2. On the field where the number will be populated, right click it or click the cog icon to open its context menu and select Calculate Field.

    3. On the calculation wizard, click the breed dropdown option to add it's variable on the box. Wrap it with square brackets after that then set the decimal places to 0 like this.

    Demo: http://form.jotformpro.com/form/40393417146958?


    Another alternative solution is to take your form' s source code, but you have to write your custom script to be able to achieve the function you want.

    Hope this helps. Regards!

  • Profile Image
    Answered on February 09, 2014 at 05:02 PM

    The problem I have is that the numbers I need returned are the base dayrate charge for the breed. I then subsequently need to perform calculations on the dayrate charge to arrive at the actual charge. Therefore I need the number to not be visible until it's finally evaluated.

    Essentially there are over 50 breeds but only 4 breed sizes: Small, Medium, Large, Giant. The dayrate is linked to size.

    £12.50 - Small

    £13.00 - Medium

    £14.00 - Large

    £15.00 - Giant

  • Profile Image
    Answered on February 09, 2014 at 05:19 PM


    That's still possible as long as you use square brackets so the text option with numbers e.g. £12.50 - Small will output 12.50. Like on my example, you can add additional formula until you get the desired output. The final result will not be displayed on the result box until the other fields that are part of the calculation aren't filled.

    Give it a try and let us know here if we can be of further assistance. Can you also provide the final form where the calculation should be done? Let us know the formula as well, and we'll try to come up a workaround/sample for you if that's possible.