• Resolved benulcoq

    (@benulcoq)


    Hi,

    I’m trying to customise the mc4wp response behaviour by making use of MC4WP’s built in events as outlined here:
    https://www.mc4wp.com/kb/javascript-form-events/

    The form is being placed in a Boxzilla (Ver. 3.2.22) box that appears on every page.

    I’m placing the script directly in the form editor after the form fields as
    the events page suggests and I’m getting a reference error where mc4wp is not defined.
    Uncaught ReferenceError: mc4wp is not defined'

    Site: ozhomenews.com.au
    WP Version: 5.4.1
    PHP Version: 7.3.16
    MC4WP Version: 4.7.7

    Any help is greatly appreciated!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Contributor Lap

    (@lapzor)

    Could you move the code to the footer or wrap it in something like

    document.addEventListener(“DOMContentLoaded”, function(event) {
    //do work
    });

    to be sure the MailChimp for Worpress scripts are loaded before your code is executed?

    Hope that helps. If you have any questions, please let me know!

Viewing 1 replies (of 1 total)

The topic ‘Reference Error: mc4wp is not defined’ is closed to new replies.