• demon_ru

    (@demon_ru)


    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 = true

    When 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.js

        this.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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author mosparo

    (@mosparo)

    Hi @demon_ru

    Thank you very much for your bug report!

    I agree, our method with wpcf7.block is not the correct way. We need it when mosparo is used in the invisible mode, but we should also take care of forms without mosparo.

    I fixed that bug yesterday and will have another round of testing today. If everything is going well, we’ll release the new version later today.

    Kind regards,
    zepich / mosparo Team

    Plugin Author mosparo

    (@mosparo)

    Hi @demon_ru

    As announced this morning, we’ve just released v1.15.2, which fixes the issue with forms without mosparo.

    Thank you very much for your assistance in resolving this issue.

    Kind regards,
    zepich / mosparo Team

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Support for two forms of CF7 with and without captcha’ is closed to new replies.