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.

Adding conditional logic making all fields dissappear

  1. Hey guys,

    I just started a very simple form and the top has a drop down saying "how can I help you". I have three options, the first is blank, the second is just talk, and the third is to get a quote.

    I want the name and email address fields under it to not show up until after they have selected one of the two last options.

    I thought it would be achieved by telling the name and email to only show up when "how can I help you" was greater than the blank first field. But when I do this, it makes nothing show up on the form.

    Thanks in advance.

    - Gary

    Posted 12 years ago on Friday July 6, 2012 | Permalink
  2. Hey there Gary, unfortunately conditional logic doesn't work that way. You'd have to apply the rules to the name and email address fields using the "Any" instead of "All" option when they select one of those drop downs.

    So two rules per field, each based on the two drop down choices - using "Any".

    Posted 12 years ago on Friday July 6, 2012 | Permalink
  3. Hmm, even when switching them to any, nothing is showing up. Not the dropdown with no conditional logic, the message which has no conditional logic, or even the submit button.

    Here is the page ... I just unchecked the conditional logic boxes on the two so it shows up now.

    http://garyupham.com/contact/

    Rob, I was hoping to practice that method you taught me last night where you made the page break, and applied the conditional logic to that and I think everything under the break had the logic applied to it, until you cleared it by making another page break. I think that's how you had it working.

    I have to figure out what I am doing wrong here first though before I can try it.

    Thanks man.

    - Gary

    Posted 12 years ago on Friday July 6, 2012 | Permalink
  4. Does it work when you preview the form from within the formbuilder?

    Posted 12 years ago on Friday July 6, 2012 | Permalink
  5. It works in the form previewer.

    Posted 12 years ago on Friday July 6, 2012 | Permalink
  6. You'll want to check for theme/plugin conflicts:
    http://www.gravityhelp.com/documentation/page/Testing_for_a_Theme/Plugin_Conflict

    Or, if you are placing the form via PHP or function call outside of WP - then you might just need to enqueue scripts/styles (see the bottom of this page):
    http://www.gravityhelp.com/documentation/page/Embedding_A_Form

    Posted 12 years ago on Friday July 6, 2012 | Permalink
  7. It's something to do with my theme ... it works with twenty eleven. Weird it's thesis. Also same theme (framework) on two other sites that I have used it with now.

    I might try and do a fresh install and see if something works itself out.

    Thanks for the help.

    Any known bugs with thesis that you know of?

    Thanks Rob.

    Posted 12 years ago on Friday July 6, 2012 | Permalink
  8. Not that I know of. I've used thesis for some client work before. Do you have a link to your form - I can help you pinpoint it.

    Posted 12 years ago on Friday July 6, 2012 | Permalink
  9. This is where it is supposed to show up

    http://garyupham.com/contact/

    I just replaced the theme so I have to upload the css back so it looks like a mess ... I can give you the admin in a private message if that helps.

    - Gary

    Posted 12 years ago on Friday July 6, 2012 | Permalink
  10. You have two references to jQuery, one in the head (which is correct) and one in the footer (which you should remove): Screenshot

    Try that out.

    Posted 12 years ago on Friday July 6, 2012 | Permalink
  11. David Peralty

    You also have the following line in your footer that needs to be removed:
    <script type="text/javascript" src="jquery.js"></script>

    All my best!

    Posted 12 years ago on Friday July 6, 2012 | Permalink
  12. Dang ... I have no idea where that is being called from. I will have to do some snooping. Was hoping it was a plugin calling it maybe but doesn't seem so.

    Posted 12 years ago on Friday July 6, 2012 | Permalink
  13. That worked ... looked like I had some code buried in there from a long time ago trying to test something for another site ... thank you so much guys. I hope they pay you well b/c yall deserve it.

    Posted 12 years ago on Friday July 6, 2012 | Permalink
  14. Awesome - glad to help out!

    Posted 12 years ago on Friday July 6, 2012 | Permalink

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