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.
Multiple required answers based on selected numberAsked by Flexx_n on January 05, 2016 at 06:22 AM
For a dance competition, teams can register using our online forms. For youth teams it is required that for each dancer the submitting team fills in the birth dates of these dancers. There is an option for teams to have between 5 and 40 dancers, so it makes it difficult to require that all 40 birthdates are submitted if there are only 5 dancers participating. My question is:
- How do I make it a required answer to give the birthdates for only the amount of participants filled in on the form? If only 5 dancers register then only 5 birthdates need to be given, whereas if 40 dancers register then all 40 must submit their birthdates.
In the first portion of the form we ask the question: "Number of dancers". What im looking for is the option for the amount that is filled in here to determine how many fields are required to be filled in in the next section where we ask for the birthdates and email addresses of the participants. Is that possible?
I look forward to hearing from you,
online forms next section register
Yes, that is possible by using conditional logic on your form, and setting it up so that if the Number of members is 1, birth day and email of dancer 1 are required.
I would also like to add that it may be better to make these fields required by default, and then use the show/hide rules instead, to show only the fields for the number of participants that are entered.
In each case, you will need to set up 40 different conditional rules for all 40 possible answers.
Here is the image of both condition types - (1) marks the rules for making fields required, and (2) marks rules that would show or hide fields based on your answers.
I will first explain the way you initially asked about, for making the fields required, and afterwards I'll explain the method of showing only the fields that are needed.
1. When setting up the condition rule for required fields, you would set it up as in the following image:
So you can use the Require Multiple action to require all the fields you need for that number of members. You need 40 such conditions - one for each possible value in the number of members field.
That should be it. If you want to select various non-consecutive fields in the Require Multiple action, you can hold CTRL key on your keyboard while clicking on each field that should be required.
2. The option I believe would look even nicer is if you used the show/hide rules instead, to only display those fields that need to be filled. It looks similar to the above, but you would instead be setting up the Show Multiple action of the Show/Hide rules:
If you decide to use the show/hide rules instead of the require rules, you can mark all your fields as required by default. You can see the following demo form with the second kind of rules already implemented:
Please let us know if this works to your satisfaction, Michelle, or if you hit any snags along the way while setting it up, and we will be happy to help.