Show more options using condition statements

  • Profile Image
    wetmutt
    Asked on August 22, 2014 at 06:34 PM

    I have a dog photography business and on my contact form, I want clients to provide information about their dogs. In addition to the basic contact information, I ask about their pet:

    dog name

    age

    breed

    characteristics

    This if fine if they have only one dog. But if they have 3 dogs, I need to replicate these questions for each one. Is there a way to add some kind of functionality that allows the user to add "add a dog", which would append these same 4 questions to the form as many times as needed?

    Thanks

    DD in Ottawa, CAN

     

     

  • Profile Image
    wetmutt
    Answered on August 22, 2014 at 07:33 PM

    Upon further investigation, I see that there is a "Conditions" option. This works great for any "if / then" statements. How do I incorporate an "if / then / else if" statement?

    For example, I can have a field "number of dogs"

    if the user enters 1

    then display

    name / age / breed / characteristics

    if user enters 2

    then display

    name / age / breed / characteristics

    name2 / age2 / breed2 / characteristics2

     etc, for the number of dogs in the household...

     

     

  • Profile Image
    jonathan
    Answered on August 22, 2014 at 09:39 PM

    Hi,

    Please check this user guide https://www.jotform.com/help/196-Hide-or-Show-Multiple-Fields-at-Once

     

    You can use the Number field as the selector then use conditions statement to SHOW fields/section base on the number field value.

    Here is a sample form http://www.jotform.me/form/42337989882474

    I setup like this

     

     

    this is the condition statement

     

     

    Inform us if you need more assistance.

    Thanks.

     

     

  • Profile Image
    wetmutt
    Answered on August 22, 2014 at 10:20 PM

    Thanks very much for the reply. I'm almost there.

    The solution you propose works for any number greater than 1, but for some reason I can't get the desired fields to display when the number is "1".

    I'm sure I'm missing something simple, but I can't see it...

    Here are some screens:

    Results when input is 3 (also works when input is 2)

    Results when input is 1

     

  • Profile Image
    ashwin_d
    Answered on August 23, 2014 at 04:24 AM

    Hello wetmutt,

    Please take a look at the following cloned form where I have changed the required condition to show / hide form fields based on the input values in field "Number of dogs" and see if this works as expected :  http://form.jotformpro.com/form/42341846838967? 

    Feel free to clone this form for a closer look. The following guide should help you in form cloning:  http://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!

  • Profile Image
    wetmutt
    Answered on August 23, 2014 at 08:09 AM

    That is just awesome support. I'm really impressed. Feeling kind of gushy...

    Anyway, I see what you did but not how you did it. Is this something I can do if I want to add another condition (if I want to go up to 4 dogs) or if I want to repeat this behaviour somewhere else on the form, or on another form?

    thanks

     

  • Profile Image
    jonathan
    Answered on August 23, 2014 at 04:57 PM

    Hi,

    If you cloned the demo form http://form.jotformpro.com/form/42341846838967 that our colleague did (follow this guide to clone), you will see how it works.

    To add more options more than the current 3 (up to 4 dogs or more), you will need to add more of the same fields for the dog's name, age, and gender. And then add the conditional statement to effect the added options.

    See screen below also for visual guidance.

     

     

    Here the new version of the form you can try http://www.jotform.me/form/42346471104447

     

    Again you can just also clone this form by following the user guide

    http://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL

     

    Thanks.