• Resolved rudoy24

    (@rudoy24)


    Hello!
    The function call wpcf7.initForm now does not work in version 5.4. How do I now customize the framework through a script?

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • sandy1682

    (@sandy1682)

    Hi,
    Contact Form 7 shifted the functions from jQuery to Vanilla Javascript. The function wpcf7.initForm is now wpcf7.init. You can use as

    jQuery

    $('.wpcf7 > form').each(function () {
        wpcf7.init($(this)[0]);        
    });

    Javascript

    document.querySelectorAll(".wpcf7 > form").forEach( function(e) {
        wpcf7.init(e)
    });
    • This reply was modified 4 years ago by sandy1682.
    • This reply was modified 4 years ago by sandy1682.
    Thread Starter rudoy24

    (@rudoy24)

    Thank! Everything works.

    tjldesigns

    (@tjldesigns)

    Brilliant, thanks so much!! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘v5.4 “wpcf7.initForm” not work’ is closed to new replies.