• Hi Brent,

    The form is submitted successfully, but the ajax response inserts the entire post body (including the “Message Sent” confirmation, etc.) where the form used to be, so the post content appears twice!

    I know that can’t be right, but I noticed that grunion-ajax.php seems to grab the entire post content

    $content = do_shortcode( $post->post_content ); (grunion-ajax.php: 80)

    for the ajax response and then inserts it into the form wrapper (like div#contact-form-id-1), and that would produce exactly the wrong behavior that I’m seeing.

    Any advice?

    http://wordpress.org/extend/plugins/grunion-ajax/

Viewing 1 replies (of 1 total)
  • Change that line to:

    $content = do_shortcode( $post->post_content );
    		preg_match( '#<blockquote>.*</blockquote>#sm', $content, $out );
    		$content = $out[0];

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Grunion Ajax] duplicates the post body after the form is submitted’ is closed to new replies.