How to show & hide multiple fields at once?

  • Profile Image
    BE
    Asked on October 05, 2011 at 01:59 AM

    Hi, I'm currently putting together quite a large form for a client - https://www.jotform.com/form/12764908762

    At the moment if the user selects "Single Application" on the first page it will hide all fields for the second applicant. I've done this by manually setting conditions to hide all the second applicant fields if this radio box is set to "Single Application", however this seems like a really clunky way to do it and not maintenance-friendly at all.

    I was wondering if there's a way to achieve the same thing without having 40 or so individual conditions set up?

    For example, putting all the second applicant fields into a form collapse and just hiding that one form collapse? I did try this but couldn't get it to work so I didn't know if it was possible.

    Kind regards
    Harmony

  • Profile Image
    joeyj01
    Answered on October 05, 2011 at 03:28 AM

    Hi, nice form you got there and I love the submit button color. Now, I checked your form and I could suggest that "skip to a page or end of form" condition will work better for you. Let me explain. The first page of the form you ask single or joint application right? so we depend on it for going to other forms or page breaks. This makes it too complicated so forget every condition and let’s design the page so that we can set up a single condition that will do the job of 40 conditions.

    Group first application forms personal, contact, and employment details etc. with page breaks. After the first applications, list the second applicant fields and set page breaks accordingly. This will only change the structure and sequence of the form so we are just redesigning the form for a simple condition.

    The condition will be set at the very end of the first applicant form group. Put another radio button at the end to confirm the user if he/she is doing a single or joint application. This will be the only condition that will either make the user to continue to the second application form group or the terms and conditions page. Let’s say you have 3 page breaks that means you have 4 pages and the 2 page is where the first applicant form group ends. At that part you insert the radio button with the “skip to page or end of form” condition set with a question asking “ Confirm Application : Single or Joint” or however you like. If “confirm application” = “single” Then after user clicks next button skip to = 4th Page.

    If the user doesn’t select single then he/she will continue filling the second application and finish the form.

    This method is a little bit different than what you asked but I tried to find the easiest solution to your problem. Hope that this answers your question.
  • Profile Image
    BE
    Answered on October 07, 2011 at 12:15 AM

    Thanks Joey :) I think that will do the trick! Much appreciated.

    The only other way I could think of to do this doesn't appear to exist yet; that would be creating a condition with one IF but multiple THEN's, e.g.

    if application = single
    then hide applicant-2-name
    then hide applicant-2-email
    then hide applicant-2-phone

    etc.

    This already works in reverse for conditions but not this way. Do you know if there are any plans to add this functionality?

  • Profile Image
    allanftd
    Answered on October 07, 2011 at 01:29 AM

    Hi BE,

    Indeed this is the perfect solution to address this issue permanently. I shall include your idea in our to Do List for consideration. We apologize if we cannot give an ETA for now.

    Please let us know if you need further assistance. Have fun using JotForm!

    Cheers,
    Allan

     

  • Profile Image
    scotsail
    Answered on September 05, 2012 at 11:31 AM

    Hi!  Are there any plans to enable compound conditions? i.e. using IF & AND operators for more complex rules? Thanks! Regards, Graeme

  • Profile Image
    NeilVicente
    Answered on September 05, 2012 at 11:50 AM

    @scotsail

    You can use the Add New Rule function to allow complex rules for your form's conditional logic.

  • Profile Image
    scotsail
    Answered on September 05, 2012 at 12:05 PM

    NeilVicente

    Ah. Yes I see now - my stupidity.   I thought that button was just another way to start a completely new rule, rather than add additional components to a formula / condition - sorry.   JotForm continues to impress... (!)

    Thanks for the quick reply, as always.

     

    Regards

    G

  • Profile Image
    NeilVicente
    Answered on October 30, 2012 at 10:34 AM

    @All

    Hiding multiple fields based on a single conditional response can now be made possible by including those fields in a form collapse section.

    Here's a guide that has the information you need:

    http://www.jotform.me/help/196-How-to-Hide-or-Show-Multiple-Fields-at-Once-Using-a-Single-Conditional-Entry

  • Profile Image
    ozan
    Answered on November 19, 2012 at 09:11 AM

    Hi,

    We've added this feature recently. You can chain single/multiple conditions to single/multiple actions, if the action type is "Show/Hide field" or "Send email". You can easily notice the new button "Add new action", in the condition wizard. So you can send more than one email if user satisfies a single condition or you can show/hide multiple fields with a single condition. Old forms will not be affected and should work as expected. Also we will appreciate it if you share your feedbacks.