• Resolved loganless

    (@loganless)


    After the last update, the handling of js events on the form has changed. Until now I could manage a pre-validation of the fields (then totally validated via php from CF7) through a simple script in jquery.

    Script steps:

    • intercepts the click on the input[type = “submit”],
    • make a preventDefault(),
    • check that the fields are valid,
    • if so, it executes a callback function (optional) and performed a submit() on the form. From here on, the CF7 submit function in ajax started and the form was sent without refreshing the page.

    After the update, however, at the time of submit() the CF7 ajax function no longer runs and the form performs a normal submit with page update (as when you deactivate the CF7 scripts).

    I’ve read the directions on DOM events, but they all refer to after the form “submit”. Are there any events on the click of input.wpcf7-submit that can create this problem?

    I inserted the link to the script, which works up to version 5.3.2 of CF7.
    Thanks!

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

The topic ‘CF7 DOM events & js custom validation’ is closed to new replies.