How to assign values to dropdown options?

  • Manna_Brooke
    Asked on April 29, 2024 at 4:09 PM

    is there a way to code a dropdown option in Jotform where I can input UPCs for specific products but the people who is submitting the form sees what the product is?


    Example: is a person is submitting a form and are requesting our product from a dropdown option, they can choose a t-shirt, but in the submission on my end, I will see the UPC for that product.

  • Raymond JotForm Support
    Replied on April 29, 2024 at 10:58 PM

    Hi Brooke,

    Thanks for reaching out to Jotform Support. I understand you'd like to have an assigned value for your dropdown option. We can use the Calculation Values and the Form Calculation widget for this. Let me show you how to do that:

    1. In Form Builder, click on the Add Element button on the left and select the Dropdown Option.
    2. Next, click on the Gear icon next to the dropdown field and click on the Options tab.
    3. Indicate your products in it, Enable the Calculation Values and assign the values for each product you have.
      How to assign values to dropdown options? Image 1 Screenshot 50
    4. Then, back to Form Elements menu, click on the Widgets tab and select the Form Calculation widget.
    5. In the Widget, use the Add Field button to include the Dropdown field in it, and click on it to change it from Number to String (A-Z).
      How to assign values to dropdown options? Image 2 Screenshot 61

    This is how it would work:

    How to assign values to dropdown options? Image 3 Screenshot 72

    The Form Calculation widget can also be hidden by right-clicking on it, and selecting the hide option so your users can't see it.
    How to assign values to dropdown options? Image 4 Screenshot 83

    Feel free to test this demo form or clone it to your account to inspect it further. We also have guides on How to Perform Calculations Using a Widget and How to Assign Calculation Values that you can check out.

    Give it a try and let us know if you need any help.

 
Your Answer