Please Note: We are no longer using forums to facilitate standard support. 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.

Form worked for a while and then disappeared

  1. Hi,

    I just purchased the gravity form. I set up the form, and then put the short code in the 'Contact Us' page.

    The form worked fine and I was able to do 2 test submissions.

    But after that the form disappeared.

    When I checked the page in IE, I see an error. Here are the error details:

    ---------------------------------------------------------------------------------------------------
    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; msn OptimizedIE8;ENGB)
    Timestamp: Wed, 16 Jun 2010 09:08:36 UTC

    Message: Syntax error
    Line: 204
    Char: 63
    Code: 0
    URI: http://tradeshows.ideaturf.com/about/contact-us

    Message: Object doesn't support this property or method
    Line: 357
    Char: 2
    Code: 0
    URI: http://tradeshows.ideaturf.com/about/contact-us
    ---------------------------------------------------------------------------------------------------

    Can someone please help.

    Posted 4 years ago on Wednesday June 16, 2010 | Permalink
  2. Can someone please address this issue? I've been waiting for over 4 hours now.

    Posted 4 years ago on Wednesday June 16, 2010 | Permalink
  3. I'm looking at it your form now.

    Please note that priority support is reserved for developer license holders. We try to answer everything in the forum as quickly as possible.. usually within 24 hours and most often, much sooner.

    Your form is still there, just hidden with a display:none style that's normal when using the conditional logic.

    Did you edit the form after the first 2 successful submissions?

    It acts like you have enabled conditional logic for a field somewhere and haven't configured it properly. I see the one field that's supposed to show if "other" is checked but that's the only one.

    Go back and make sure you haven't inadvertently enabled conditional logic on a field and didn't configure it.

    If that's a no-go, then you can send us an admin login to your site via our contact form and we'll get in there and check it out as soon as we can.

    Posted 4 years ago on Wednesday June 16, 2010 | Permalink
  4. Hi Kevin,

    Yes, issue seems with conditional logic. I've removed it now and the form works fine. However, I'd like to use the conditional logic.

    Show a field is 'other' is checked. Apart from this, what else needs to be done?

    Posted 4 years ago on Wednesday June 16, 2010 | Permalink
  5. The logic for that field appeared to be right from what I could tell. This is usually a case of another field where the "enable conditional logic" option is checked, but then not configured.

    It's a pretty straightforward process setting up simple conditionals and normally isn't a problem unless there's some kind of script or plugin conflict.

    You said you submitted a couple of times initially just fine.. did you make any changes after that such as edit the form, enable another plugin, etc?

    It's hard to know for sure without seeing the entire form setup. We'll probably need access to your WP admin to debug it further.

    Posted 4 years ago on Wednesday June 16, 2010 | Permalink
  6. Hi Kevin,

    I tried the positive and negative for the conditional logic and the form disappears.

    I sent you the login details to the wp-admin via the contact form. Look forward to your assistance.

    Posted 4 years ago on Wednesday June 16, 2010 | Permalink
  7. Okay, thanks. We'll check it out as soon as we can and let you know what we find.

    Posted 4 years ago on Wednesday June 16, 2010 | Permalink
  8. I have received the login and we are looking into this issue. It is a theme conflict. Something in the Panda Themes Next Element theme is causing problems with shortcode output which is causing a conflict with the conditional logic javascript that Gravity Forms uses.

    This is an issue we have only encountered with the Panda Themes Next Element theme. We are looking into it to see why it is happening but it is most likely due to poor coding within the theme. We will get back to you with some sort of fix, but it will probably require changing something within your theme.

    Just FYI, you were waiting 4 hours for a response because you purchased our product in the middle of the night. We were sleeping. We don't provide 24/7 support. We have standard business hours and you purchased the plugin and posted your support request outside of those business hours.

    Posted 4 years ago on Wednesday June 16, 2010 | Permalink
  9. Oppss... I had a feeling it was to do with the theme or a conflict with some other plugin.

    I'll disable the conditional logic for now and wait to hear from you.

    Thanks.

    Posted 4 years ago on Wednesday June 16, 2010 | Permalink
  10. The issue is definitely theme related (if you'll notice, the form preview in the admin works properly)

    So, that being said, we're pretty sure this is related to a shortcode in your theme. They tout 54 shortcodes for this theme, so it's hard to say what it might be without seeing the theme files.

    Could you email me a copy of the theme zip file? If so, we could test it here and hopefully help you get it fixed. If not, I can point you in the general direction and you can work with the theme provider to debug it.

    Please send it to kevin@rocketgenius.com

    Posted 4 years ago on Wednesday June 16, 2010 | Permalink
  11. The issue is a shortcode that the Next Elements theme introduces causes a problem with how WordPress outputs shortcode content.

    Edit This File:

    nextelement/admin/includes/shortcodes/shortcodes.php

    Remove this block of code which begins around line 30 of the above file:

    // DISABLE AUTOFORMATING POSTS
    function my_formatter($content) {
    	$new_content = '';
    	$pattern_full = '{(\[noformat\].*?\[/noformat\])}is';
    	$pattern_contents = '{\[noformat\](.*?)\[/noformat\]}is';
    	$pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);
    	foreach ($pieces as $piece) {
    		if (preg_match($pattern_contents, $piece, $matches)) {
    			$new_content .= $matches[1];
    		} else {
    			$new_content .= wptexturize(wpautop($piece));
    		}
    	}
    	return $new_content;
    }
    remove_filter('the_content', 'wpautop');
    remove_filter('the_content', 'wptexturize');
    add_filter('the_content', 'my_formatter', 99);

    This block of code disrupts how WordPress handles shortcodes and causes it to process all other shortcode output using the wpautop function that adds HTML paragraph tags where line breaks exist. So while the above shortcode WILL allow you to place unformatted code in your post body, it's side effect is it then applies the wpautop to all other shortcodes because it changes the order in which filters are executed.

    Removing the above code will allow the Next Element theme and Gravity Forms to play nicely together.

    Posted 4 years ago on Wednesday June 16, 2010 | Permalink
  12. Hi Carl/Kevin, this is interesting. Would this snippet of code cause the same problem?

    http://www.catswhocode.com/blog/top-10-wordpress-hacks-from-june-09

    function my_formatter($content) {
    	$new_content = '';
    	$pattern_full = '{(\[raw\].*?\[/raw\])}is';
    	$pattern_contents = '{\[raw\](.*?)\[/raw\]}is';
    	$pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);
    
    	foreach ($pieces as $piece) {
    		if (preg_match($pattern_contents, $piece, $matches)) {
    			$new_content .= $matches[1];
    		} else {
    			$new_content .= wptexturize(wpautop($piece));
    		}
    	}
    
    	return $new_content;
    }
    
    remove_filter('the_content', 'wpautop');
    remove_filter('the_content', 'wptexturize');
    
    add_filter('the_content', 'my_formatter', 99);

    It's not part of my theme (saw your tweet :-) ), but I do use that in functions.php to disable autop formatting by wrapping my content in a shortcode. I've had problems with nextgen gallery shortcode outputting invalid XHTML unless I wrap in [raw] shortcode, and the same with Gravity Forms. I recall asking about it once before:

    http://forum.gravityhelp.com/topic/page-will-not-validate-with-form-in-it-unless-i-remove-filters

    I would be very happy to know that the problem is coming from the use of this shortcode (or rather, the fact that the shortcode is in my functions.php and the invalid code comes from NOT using the [raw] shortcode around the gravity forms or nextgen gallery shortcodes.)

    So, Kevin, if the invalid XHTML is because caused by this raw shortcode being added to functions.php, how can I do something similar but not mess up the order in which the filters are processed? I know it's not Gravity Forms, but I am hoping to resolve this long-simmering issue.

    Thank you guys very much. Sorry to hijack the thread.

    Posted 4 years ago on Wednesday June 16, 2010 | Permalink
  13. YES. The same issue would happen with the RAW shortcode above. The problem is while that function call doesn't process the shortcode using the wpautop function call if the shortcode matches RAW (or in this themes case NOFORMAT), it then applies it to all other shortcodes. It shouldn't be applying it to ANY shortcodes. But thats what happens.

    *BUT* I came up with a work around that requires NO code changes on either end. It's actually quite funny. The function call causing the problem doesn't apply the autoformatting if the shortcode you use matches what is specific in the function call. So what I did is wrap the Gravity Forms shortcode within that shortcode and it works!

    So instead of:

    [gravityform id=1 name=My Form Title]

    Do:

    [noformat][gravityform id=39 name=ContactMe][/noformat]

    It worked testing locally and the conditional logic form output and submitted fine.

    If your function call uses [raw] instead of [noformat] you would just switch it out.

    Posted 4 years ago on Wednesday June 16, 2010 | Permalink
  14. Thanks Carl. That's what I've been doing and I'm glad to know you came up with the same solution.

    Posted 4 years ago on Thursday June 17, 2010 | Permalink
  15. Hi guys,

    Thanks for your help.

    Yes the [noformat] code did the trick without having to change any code.

    Thanks and cheers to you!!

    Posted 4 years ago on Thursday June 17, 2010 | Permalink

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

Support Tickets

Open A New Support Ticket
 Open A New Priority Support Ticket *

* Developer license holders only