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 );