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.

Conditional Logic and the Submit button

  1. I am trying to figure out the conditional logic and this is what I have been trying to create but it does not seem to function:

    At the top of the form i want the users Contact Information
    Then I have a conditional box that says " if you want to submit more info for a quote, click this check box"
    When you put a check mark in the box the rest of the form shows up and show the user more information to put in.

    This is where I get lost:

    I want to have a submit button show up if the user does NOT put a check mark in, then they can just send us their Contact Info and a comment only (maybe they don't want a quote).
    But if they want to get a quote, they put a check mark in, the form continues and they fill it out then submit.

    How to I get the Submit button to show up underneath the "Contact Information form" and just above the check mark first, then disappear if they put a check mark in the box, and have it appear at the end of the form?

    I hope this makes sense. I am currently only creating this on a test box so I cannot send a URL.

    Thanks,

    Posted 13 years ago on Friday May 20, 2011 | Permalink
  2. If I understand you correctly this is exactly how Gravity Forms already works.

    I'd add a new Section (for the extra info) and add the conditional logic to that section (to only display if that checkbox has been checked). Then the section will display where it should (based on the location in the form editor) and the submit button will get below that section.
    If you have multiple sections that need to be displayed in the form when the checkbox is checked just add the same conditional logic to all those sections.

    Posted 13 years ago on Friday May 20, 2011 | Permalink
  3. You would use conditional logic to show/hide the fields you want to appear. In your case you wouldn't use conditional logic on the submit button, the submit button is always going to be visible. The checkbox would just show additional fields. You would add conditional logic to the fields you want to show so that they only show if the checkbox is checked.

    Conditional Logic is found in the Advanced tab of fields. You enable it and then configure what conditions must be met to show or hide that field.

    As @illutic explained above one easy way you can accomplish this is add a Section Break just below the checkbox field, then add your additional fields that you want to display below that Section Break. Then apply conditional logic to that Section Break so it only appears if the checkbox is checked. This will then show ALL of the fields below that Section Break only if the checkbox is checked.

    You can't make the submit button appear above the checkbox. The submit button always appears below all of the fields, it's not even in the same container. So you can't make it appear above form fields.

    Posted 13 years ago on Friday May 20, 2011 | Permalink
  4. Thanks guys, That was my problem. I was adding a conditional logic to the submit button.
    I did add the section break, and as I said the form worked when I put the check mark in the box, but the submit button only then showed at the end of the form, not before the check box (or with it).

    Posted 13 years ago on Saturday May 21, 2011 | Permalink

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