Support for two forms of CF7 with and without captcha
-
There are two CF7 forms on the page: one with a captcha field and the other without.
plugins/mosparo-integration/src/MosparoIntegration/Helper/FrontendHelper.php
Since there is a field in one form, the plugin code (prepareAdditionalJavaScriptCode) adds the JS code.
The code does: wpcf7.blocked = trueWhen the user clicks on the submit button on the form without a captcha, the code of the mosparo server part is launched.
assets/mosparo-frontend.jsthis.formElement = currentElement; if (this.options.allowBrowserValidation && this.formElement.hasAttribute('novalidate')) { this.formElement.removeAttribute('novalidate'); }This code excludes the non-captcha form from the list of forms that the onSubmit event is set to. Which assumes the change: wpcf7.blocked = false
As a result, our form is not sent due to blocking (wpcf7.blocked), the behavior is broken
The topic ‘Support for two forms of CF7 with and without captcha’ is closed to new replies.