Multiple required answers based on selected number

  • Flexx_n
    Asked on January 5, 2016 at 6:22 AM

    Hello,

     

    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,

    Michelle Provacia

  • Boris
    Replied on January 5, 2016 at 9:16 AM

    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.

    Multiple required answers based on selected number Image 1 Screenshot 40

    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:

    Multiple required answers based on selected number Image 2 Screenshot 51

    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:

    Multiple required answers based on selected number Image 3 Screenshot 62

    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:

    https://form.jotformpro.com/60043784288966 (you can clone it into your account to take a closer look into how it is set up)

    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.