PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Options change

  1. LexiLynStudio
    Member

    Is there a way to make it so if a certain option is chosen it will determine the next set of questions? So if the question is a yes or no question, if the person chooses "yes" then a new set of questions appears, if "no" is chosen then those extra questions don't appear?

    Sorry...not quite sure how to explain it...

    Posted 12 years ago on Tuesday August 30, 2011 | Permalink
  2. Yes, that's called conditional logic and you can enable that per-field or for whole sections of your form.

    http://www.gravityhelp.com/documentation/page/Enable_Conditional_Logic

    you can see it in action on this demo

    http://www.gravityforms.com/demo/gravity-forms-conditional-logic-form-demo/

    change the "who would you like to contact" selector to see different options.

    Posted 12 years ago on Tuesday August 30, 2011 | Permalink
  3. What do you mean by "or for whole sections of your form"? It's not addressed in the docs at the link you provided. Do you just mean you can apply the same rule to multiple fields to have them show?

    I'm trying to do a simple membership eligibility/interest question that seems to require some "or" login, not just "all" or "any".

    I guess I can repeat the field multiple time with different sets of rules, but it seems like it should be doable within one instance, no?

    Alternatively can multiple instances of the same field have the same field nale so the data is in one place?

    Does that make sense?

    Thanks,
    Michael

    Posted 12 years ago on Thursday September 1, 2011 | Permalink
  4. Conditional logic can be applied to the section break elements as well as individual fields. Anything within that "section" up to the end of the form or the next section break will be shown/hidden conditionally based on the rules you apply. There's currently no thorough documentation for this that's specific to the section break, but it works just the same as single fields.

    http://www.gravityhelp.com/documentation/page/Section_Break

    No, the fields are all dynamically assigned unique names so it won't work the way you're describing If I understand correctly.

    Posted 12 years ago on Thursday September 1, 2011 | Permalink
  5. Thanks for the response. i get the section thing now.

    I basically have a questionnaire in this format:

    A. Are you Member?
    Yes | No
    B. Do you meet these criteria?
    1, 2, 3, 4, 5
    C. Do You meet this Criteria?
    Yes | No
    D. Would you like to be a member?
    Yes | No

    I'd like to show the last question, D, to show if the answer to A is No, and either check any of B-1, B-2, B-3, B-4, or they answer Yes to C.

    Is that doable in anyway?

    Thanks,
    Michael

    Posted 12 years ago on Thursday September 1, 2011 | Permalink
  6. Yeah, it sounds like all that's doable with the conditional logic. Let us know if you run into any problems and we'll be happy to help guide you through.

    Posted 12 years ago on Thursday September 1, 2011 | Permalink
  7. I can't figure out how to set up the either/or part.

    Maybe I'm just thinking about it wrong, but I'm not seeing how to do it.

    Are there any examples you can point me to to illustrate how?

    Thanks,
    Michael

    Posted 12 years ago on Thursday September 1, 2011 | Permalink
  8. Any additional guidance you can provide would be appreciated.

    Thanks,
    Michael

    Posted 12 years ago on Friday September 2, 2011 | Permalink
  9. I think your use case is too complex to handle with conditional logic as you wrote it. You want to do a combination of AND and OR

    [php]
    (("A == NO" AND B IN (1,2,3,4) OR "C == YES")

    which is not currently possible with the conditional logic in the form builder. You may have to think of a different way to phrase the questions as qualifications so they can arrive at "yes, I would like to become a member" which is likely the goal?

    If the answer to A is YES, they never get the option to join. Maybe what you could do is make the submit button conditional based on the answer to question A? Or have an additional form as the qualifying question. If they're not a member, then you can send them from form one to the second form, which would have questions B and C, which you can certainly use in conditional logic to show field D. If they're already a member, are they even going to be interested in the form?

    What should happen if they do NOT meet the criteria (if they answer NO to C or check B5, correct?) Do you show them anything? Also, what happens at the end if they say, NO, they do not want to become a member? Can they still submit the form?

    You could also just accept their answers on the front end (just ask all the questions) then use more complex conditions in functions.php to customize their notification email or the confirmation message they see:

    • "We're sorry, you do not qualify for this program."
    • "Are you sure you don't want to become a member? Check out all these benefits."
    • Based on our preliminary evaluation, you qualify for membership. An associate will be in touch with you soon.

    I've found that with conditional logic you sometimes needs to revise the workflow or thought process to make it work with simple AND/OR logic. If you can post your complete form and what should happen in every case (flowchart?) we may be able to help you come up with a solution.

    Posted 12 years ago on Friday September 2, 2011 | Permalink
  10. It's actually a contest entry form, so that's the main goal — get them to enter:
    http://trojandreams.df-dev.com/wordpress/contest/

    I think the simplest solution is to have the client just make the Live/Work in LA question a checkbox in the previous Affiliation question, but they may want to keep them separate somehow.

    The second goal is to get them to be a member if they are not already. To be eligible they need to be any USC affiliate (except just a fan) or they need to live, work, attend school or church in the City of Los Angeles... So it's kind of broad, but out of town guest and people living outside the city are not eligible for instance.

    Thoughts?

    -Michael

    Posted 12 years ago on Friday September 2, 2011 | Permalink
  11. I've been thinking about it all day, and I have not come up with a solution. I think it needs to be simplified to have a straighter path through, but I can't wrap my head around the best way yet. It might need to be broken up into multiple forms, or even allow the contest entry if they are eligible, then follow up with email to try to get them to become members.

    Will think more, but I think simplifying it will make it possible with Gravity Forms.

    Posted 12 years ago on Saturday September 3, 2011 | Permalink
  12. Thanks, Chris.

    We ended up just making the field show if they are not already a member. They'll just have to visually triage eligibility based on the other selections for now.

    It would be nice if Gravity Forms conditional logic let you build something a little more complex in future versions.

    Thanks,
    Michael

    Posted 12 years ago on Saturday September 3, 2011 | Permalink
  13. Glad you found a workaround.

    Posted 12 years ago on Saturday September 3, 2011 | Permalink

This topic has been resolved and has been closed to new replies.