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.
How can I require a minimum number of items to be purchased?Asked by justenjoy on November 22, 2014 at 02:20 AM
I need to set up the order form on my site so that if someone is selecting a shipped order, they are required to purchase at least two dozen cookies. Help!
I've had a look at your jotform and I don't think this is something which can be accomplished in the form builder. If The Brownie cookie was packed in dozens like the others, it might be doable but I'm not sure. If it can't be done in the form builder, a custom script will need to be used and since such scripts cannot be used in the form builder, the jotform would need to be embedded in a web page and the script added there.
Let me experiment a bit and get back to you. In the meantime, my colleagues may well have a solution or two for you.
It's actually possible to do this in the form builder. Please have a look at this jotform and let us know if its functionality is okay. If so, and there's no need to use your current jotform, you can simply clone mine and use it as your own. However, if you need to use your current form, still clone mine and have a look at the following changes which I made:
1. For each type of cookie, a calculation widget was added and a "type of cookie * 12" calculation was implemented. (In the case of the Brownie cookie it was "type of cookie * 8")
2. A "Number of Cookies" calculation widget was also added to capture the sum of the aforementioned calculation widgets
3. A message notifying customers of the requirement to buy at least 2 dozen cookies was added
4. A condition to show the aforementioned message and hide the submit button was added
5. The validation on each cookie field was set to numeric (to prevent users from entering letters)
Except for some edits to the jotform's style, that's pretty much it. If you would like clarification on anything, please let us know.
Hey this looks great! It works perfectly. I'm going to clone it and take a look at the specifics so that I can learn something here. Thanks a million!
We are glad to know that our colleague Abajan solution works.
Please contact us again anytime should you require further assistance on this.