DOM Events Review
-
WPCF7 Team, good night!
I’ve been trying to make some customizations to the form and fields during the submission process and I saw that all DOM Events are triggered only after the AJAX call. I would like to propose a change of flow, in order to add or change some events:
1. wpcf7submit: fired at the beginning of the process, as soon as the submit button is pressed
2. wpcf7submiterror: triggered if there was a validation error, which would prevent the AJAX call
3. wpcf7submited: the AJAX call was made and the data sent to the backend, regardless of the result
Along with wpcf7submited the other events (wpcf7invalid, wpcf7spam, wpcf7mailsent and wpcf7mailfailed) would be triggered according to each result of the email sending process.
It would also be nice to have a wpcf7mailskiped event, in cases where the skip_mail attribute is active.
I would be very happy to see events like these available in the next versions.
Best regards,
Raphael Ramos
- The topic ‘DOM Events Review’ is closed to new replies.