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

    Creating prices for multiple conditions

    Asked by rsabian on November 30, 2016 at 11:07 AM

    I have a dropdown list of states and I know how to make a price for each, but each state has an additional express and regular price.

    How do I create a product price based on State>regular or State>express and how do I get that number to go to the credit card payment field.

     

    thank you

    prices multiple conditions creating
  • Profile Image
    JotForm Support

    Answered by Charlie on November 30, 2016 at 01:56 PM

    It depends on how your formula or calculation works. Example, is your express fee different from each States? Does each state have a different regular price? 

    If each state has a complicated calculation, then you might need to create separate conditions for each of them. Here's an example:

    1. First the state and the "reg/exp" should already have a fixed calculation value on them. You can assign value on them by following this guide: https://www.jotform.com/help/301-How-to-Assign-Calculation-Value 

     

    2. Now I will add a form calculation where the final total will be inserted. Please note that I do not add a direct formula inside. Assuming that all states have unique calculation. We also need this widget to pass the calculated price to the payment field.

    3. I will then setup a conditional logic using the "Update/Calculate Field" option. Here's a guide to learn more about it: https://www.jotform.com/help/268-How-to-Insert-Text-or-Mathematical-Calculation-into-a-Field-Using-Conditional-Logic 

     

    4. Here's how one of my conditions works:

    IF "reg/express" is equal to "Express"

    AND

    IF state is equal to "West Virginia"

    THEN

    Perform the calculation "State" drop down calculation value + "reg/express" calculation value + 10 (assuming there's additional fees)

    INSERT calculated value to "Final Total" field.

     

    5. Now to pass that calculated value to the payment field, we need to map the "Final Total" form calculation widget in the Payment Wizard:

     

    Here's the specific guide about this step: https://www.jotform.com/help/275-How-to-Pass-a-Calculation-to-a-Payment-Field 

     

    Now with that approach, you can create custom calculation on each of the state with a combination of regular or express. 

    I hope that gives you an idea on how to proceed.