Forums

Grunion Ajax
duplicates the post body after the form is submitted (2 posts)

  1. Sam_a
    Member
    Posted 6 months ago #

    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/

  2. Simon Prosser
    Member
    Posted 3 months ago #

    Change that line to:

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

Reply

You must log in to post.

About this Plugin

About this Topic