What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Populate a numerical field based on a dropdown choice

    Asked by hilltopkennels 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?

    select
  • Profile Image
    JotForm Support

    Answered by EltonCris on February 09, 2014 at 04:30 PM

    Hi,

    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.

    Example:

    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 by hilltopkennels 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
    JotForm Support

    Answered by EltonCris on February 09, 2014 at 05:19 PM

    @hilltopkennels

    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.

    Thanks!