How to have form add cost to total when specific option is selected?

  • uofscalumni
    Asked on January 28, 2021 at 9:18 PM

    On the 2021 Spurs Up Sprint Registration I would like when "ship it" is selected for the cost ($8) be added to the price. It is adding $8 even when "pick up" is selected. Also, is there a way to not have to click the plus button to select shirt sizes. The current way, it seems people may miss the shirt size step.


    Thank You.

    Jotform Thread 2857831 Screenshot
  • Ashwin JotForm Support
    Replied on January 29, 2021 at 3:44 AM

    I did check your form and found that you have enabled shipping in payment tool. Please note that when your user select any option in single choice question "How would you like to receive your race packet?", it will not add any amount in payment tool.

    Unfortunately it is not possible to conditionally add shipping charge in the payment tool. If you want to add any amount to the payment field based on the user's answer, you will have to use regular form fields to list your products. Here are the steps you need to follow:

    #1. Use regular form fields to list your products.

    #2. Set "Calculation Values" for the product pricing.

    #3. You can also set the calculation values in the quantity dropdown to set the price for different quantities. The following guide should help you how to set calculation values: https://www.jotform.com/help/301-how-to-assign-calculation-value

    #4. Add "Form calculation" widget to calculate the amount per product based on the quantity if you do not use calculation values in quantity dropdown.

    #5. Add a hidden form calculation widget to calculate the total amount. The following guide should help you how to perform calculation: https://www.jotform.com/help/259-how-to-perform-form-calculation-using-a-widget

    #6. Add another form calculation widget to read user's answer in "How would you like to receive your race packet?" field add the desired shipping amount. (If you have set the calculation value in the single choice question, you can just read the value.) The following guide should help you how to add condition to insert / update value: https://www.jotform.com/help/268-how-to-insert-text-or-calculation-into-a-field-using-conditional-logic

    #7. Pass the final calculation value to the payment tool of form to process payment. The following guide should help you: https://www.jotform.com/help/275-how-to-pass-a-calculation-to-a-payment-field

    Hope this helps.

    Do get back to us if you have any questions.

  • uofscalumni
    Replied on January 29, 2021 at 3:45 PM

    Is there a way you can put this in more laymans terms? I am very confused by this response, sorry.


    To clarify, despite which option I choose (Pick up or Ship it) it adds $8 to the total. How do I set it to only add $8 when "ship it" is selected?

    Thanks

  • Lorenz JotForm Support
    Replied on January 29, 2021 at 10:23 PM

    To clarify, despite which option I choose (Pick up or Ship it) it adds $8 to the total. How do I set it to only add $8 when "ship it" is selected?

    I've checked your form, and the product "Shipping" is currently selected by default, that's why it's giving an initial cost of $8 dollars when proceeding to the products page.

    Kindly disable its default value from the product settings.

    1611976987 6014d11bddc1c test   2021 01  Screenshot 10

    I hope this helps. Let us know if you need any further assistance.

  • uofscalumni
    Replied on January 30, 2021 at 8:33 PM

    Great. Thank you for that. That fixes my problem of $8 being added automatically.

    Now, I would like to know how to have the question "How would you like to receive your race packet?" question to add $8 shipping when "Ship it" is selected ONLY. For example, if I select "Pick it up" I would like for zero shipping to be added to the total cost on the next question when picking the package. But, if I select "ship it" I would like for $8 to be added to the total when picking which race package. Thank you.

  • Ashwin JotForm Support
    Replied on January 31, 2021 at 3:35 AM

    Please accept my apology for the confusion. It is not possible to achieve your requirement in the current setup. If the products are added in a payment tool, and you want the shipping amount to added based on the user's answer in another question, it is not possible to achieve your requirement.

    To achieve your requirement, you need to use regular form fields to list your products. I did check your form and found that you have added sub-product and listing all the and calculating the amount will be difficult. I would suggest you to please add the shipping option as one of the product which user can select. Please take a look at the following clone form and see if it fits into your requirement: https://www.jotform.com/210301345800943

    I have added the last product as shipping option. Feel free to clone this form for a closer look. The following guide should help you in form cloning: https://www.jotform.com/help/42-how-to-clone-an-existing-form-from-a-url

    Hope this helps.

    Do get back to us if you have any questions.

  • uofscalumni
    Replied on January 31, 2021 at 8:49 PM

    Thank you.

  • uofscalumni
    Replied on February 1, 2021 at 9:17 AM

    Is there a widget that can be added to calculate shipping costs based on the address the package will be shipped to? For example, I live in Columbia, SC and would like my package shipped to me (which is local) so the cost will be minimal compared to the person who wants the package shipped to them in California. Does that make sense?
  • Jovanne JotForm Support
    Replied on February 1, 2021 at 10:19 AM

    Hi there,

    Your last question will be answered on this support ticket https://www.jotform.com/answers/2864198 so we can address it separately to avoid confusion.

    We will get back to you via that thread shortly.

    Thank you.