Conditional additional set of fields

  • Profile Image
    encontrosf
    Asked on October 06, 2011 at 07:57 PM

    I'm creating an event registration form.

    There is an option to add family members that will accompany the guest. If the guest chooses to bring 3 family members I need to display 3 extra sets of fields (name, birthdate, etc.). However if the guest chooses to bring 5 family members I need to display 5 extra sets. Any way to accomplish that?

  • Profile Image
    fxr
    Answered on October 06, 2011 at 08:33 PM

    Hello.

    You going to have to set a theoretical maximum on the number of guests that someone can bring. 

    I have created an example with 6. ( you could add as many as you want )

    http://www.jotform.com/form/12780803289

    Is that the functionality you are looking for?

     

    To achieve that you need to use conditions to hide the Guest 1 - full name, Guest 2 - full name, Guest 3 - full name etc fields when the 'how many extra guests' dropdown list is empty.

    Then (with conditions)

    When the how many extra guests dropdown is changed to 1, 2, 3, 4, 5 or 6 , you show the Guest 1 - full name.

    When the how many extra guests dropdown is changed to 2, 3, 4, 5 or 6, you show the Guest 2 - full name.

    When the how many extra guests dropdown is changed to 3, 4, 5 or 6, you show the Guest 3 - full name.

    When the how many extra guests dropdown is changed to 4, 5 or 6, you show the Guest 4 - full name.

    When the how many extra guests dropdown is changed to 5 or 6, you show the Guest 5 - full name.

    When the how many extra guests dropdown is changed to 6, you show the Guest 6 - full name.

     

    Does that logic make sense to you? Its a little bit convoluted but it is relatively straightforward.

    Shout back if you need any clarification with anything.

  • Profile Image
    encontrosf
    Answered on October 06, 2011 at 08:48 PM

    It's exactly what I'm trying to do. But I need it to display more than one field per extra guest.

    if 1 extra guest is selected it should show "full name", "birthday", "email", "phone number" fields.

    if 2 extra guests than twice those fields and so on.

    And to hide and show those fields I need to create one condition for each field? That would make the number of conditions goo through the roof, right ?

     

    EDIT: What I'm wondering is: Can I combine all those fields in a group "Guest Info", and have a condition to display the whole group of fields? And also duplicate the whole group instead of every single field?

  • Profile Image
    fxr
    Answered on October 06, 2011 at 09:04 PM

    Yes. 

    You would need to do the same as i did with the full name fields for each of additional field you wanted to add. 

    It will get a little tedious, but there is no other way around it. The functionality is there though. I used 12 conditions to set up my example form, so to add 3 more fields other than full name, you would end up with 48 conditions in total. 

    That number of conditions wont crash any of our servers; itll just take a little bit of time to set up. 

     

    EDIT:

    & No there isnt yet any ability to group sets of fields together to show/hide, but that feature is on the developers long to do list. 

  • Profile Image
    encontrosf
    Answered on October 06, 2011 at 09:10 PM

    Thanks for the help.

    One thing I found missing in Conditions is the ability to perform multiple actions based on one rule.

    Eg.

    If "field" equals "yes" then

    Show field X

    Show field Y

    Hide field Z

  • Profile Image
    fxr
    Answered on October 06, 2011 at 09:15 PM

    Yes, I agree. That type of functionality is often requested and i know the developers are actively pursuing its' addition.