Quantcast
Channel: WordPress.org Forums » [Contact Form 7] Support
Viewing all articles
Browse latest Browse all 49500

intelligentDesign on "[Plugin: Contact Form 7] Spinning Arrow keeps on spinning after clicking submit button"

$
0
0

I noticed the problem today when I was giving a demo to my client...RRRRRRRrrr why do they always malfunction at such times?!

Anyway, Chrome's network inspector showed the following output from the AJAX call upon submitting a Contact Form 7 form that contained checkboxes:

<br />
<b>Warning</b>:  trim() expects parameter 1 to be string, array given in <b>/home/jagfs/public_html/id-content/plugins/contact-form-7/includes/classes.php</b> on line <b>599</b><br />
<br />
<b>Warning</b>:  trim() expects parameter 1 to be string, array given in <b>/home/jagfs/public_html/id-content/plugins/contact-form-7/includes/classes.php</b> on line <b>599</b><br />
{"mailSent":true,"into":"#wpcf7-f2062-p2063-o1","captcha":null,"message":"Your message was sent successfully. Thanks."}

The icon keeps spinning because Javascript doesn't know how to handle the error message. It only knows what to do with the JSON (the last part){"mailSent":true,"into":"#wpcf7-f2062-p2063-o1","captcha":null,"message":"Your message was sent successfully. Thanks."}

The solution is to do what was pointed out in another thread: open up /includes/classes.php and from line 599 change

$submitted = trim( $submitted );

			if ( is_array( $submitted ) )
				$replaced = join( ', ', $submitted );
			else
				$replaced = $submitted;

to this instead

//$submitted = trim( $submitted ); Lose this line
			if ( is_array( $submitted ) )
				$replaced = join( ', ', $submitted );
			else
				$replaced = trim( $submitted );

Viewing all articles
Browse latest Browse all 49500

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>