Title: error showing before form
Last modified: August 31, 2016

---

# error showing before form

 *  Resolved [adijeff](https://wordpress.org/support/users/adijeff/)
 * (@adijeff)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/error-showing-before-form/)
 * Hi Danny,
 * After updating from v2 to v3 (3.0.10) I am now getting an error message before
   the from on single post pages:
    [http://www.ollystabler.com/special-offer-on-wedding-photography/](http://www.ollystabler.com/special-offer-on-wedding-photography/)
 * The error is: `!function(){window.mc4wp||(window.mc4wp={listeners:[],forms:{on:
   function(n,w){window.mc4wp.listeners.push({event:n,callback:w})}}})}();`
 * The PHP I am using is as per this page: [https://mc4wp.com/kb/show-form-from-theme-file/](https://mc4wp.com/kb/show-form-from-theme-file/)
 * I have also tried `echo do_shortcode('[mc4wp_form]');` but the same error shows.
 * My PHP version is 5.3.3
 * Thanks for any help.
 * [https://wordpress.org/plugins/mailchimp-for-wp/](https://wordpress.org/plugins/mailchimp-for-wp/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/error-showing-before-form/#post-6934024)
 * Hi Adijeff,
 * I just looked at your page source and it seems that the `<div>` element that 
   is wrapping the form is missing its closing `>` tag, which causes some of the
   form code to show-up.
 * This is the part with the error in it.
 *     ```
       <div class="mailchimp-signup"<script type="text/javascript">!function(){window.mc4wp||(window.mc4wp={listeners:[],forms:{on:function(n,w){window.mc4wp.listeners.push({event:n,callback:w})}}})}();</script><!-- MailChimp for WordPress v3.0.10 - https://wordpress.org/plugins/mailchimp-for-wp/ --><form id="mc4wp-form-1" class="mc4wp-form mc4wp-form-1985 mc4wp-form-basic" method="post" data-id="1985" data-name="Default sign-up form" ><div class="mc4wp-form-fields"><p>
       ```
   
 * If you look closely at the start, you’ll see that it should read like this.
 *     ```
       <div class="mailchimp-signup"><script .....
       ```
   
 * Hope that helps. If not, let me know!
 *  Thread Starter [adijeff](https://wordpress.org/support/users/adijeff/)
 * (@adijeff)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/error-showing-before-form/#post-6934053)
 * Yes, that was it – thanks very much for spotting the mistake. And I am very sorry
   it was nothing to do with the plugin!
 * In the code I had:
    `echo '<div class="mailchimp-signup"';` But it should have
   been: `echo '<div class="mailchimp-signup">';`

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘error showing before form’ is closed to new replies.

 * ![](https://ps.w.org/mailchimp-for-wp/assets/icon-256x256.png?rev=1224577)
 * [MC4WP: Mailchimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailchimp-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailchimp-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailchimp-for-wp/reviews/)

## Tags

 * [form error](https://wordpress.org/support/topic-tag/form-error/)

 * 2 replies
 * 2 participants
 * Last reply from: [adijeff](https://wordpress.org/support/users/adijeff/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/error-showing-before-form/#post-6934053)
 * Status: resolved