• Resolved mireille76

    (@mireille76)


    Hello,
    I have a Forminator form and I use TranslatePress for translating (main language of my site is French and second language is English).
    The form works well on the French page, but on the English page I get an error “This field is required. Please check it” on the “Consent” field, even if the field is checked.
    When I set the “consent field” as “optional” instead of “required”, then the form submits well in both languages.
    Does anyone have an idea, how to solve this (as the “consent” field should be “required”) ?
    Thank you very much in advance for any help.
    Mireille

    When inspecting the pages I see this code for the consent field:
    English :
    <div id="consent-1" class="forminator-col forminator-col-12"><div class="forminator-field"><label for="forminator-field-consent-1_635648a92acea" class="forminator-label">Consent <span class="forminator-required">*</span></label><div class="forminator-checkbox__wrapper"><label for="forminator-field-consent-1_635648a92acea" class="forminator-checkbox" style="margin: 0;" aria-labelledby="forminator-field-consent-1_635648a92acea__label"><input type="checkbox" name="consent-1" value="checked" id="forminator-field-consent-1_635648a92acea" data-required="true" aria-required="true" tabindex="-1" aria-invalid="false"><span class="forminator-checkbox-box" aria-hidden="true"></span></label><div id="forminator-field-consent-1_635648a92acea__label" class="forminator-checkbox__label"><p>By clicking on the “Send” button, I agree that the data entered above will be used to process my application.</p></div></div></div></div>

    French:
    <div id="consent-1" class="forminator-col forminator-col-12 "><div class="forminator-field"><label for="forminator-field-consent-1_63564af9b88cd" class="forminator-label">Consentement <span class="forminator-required">*</span></label><div class="forminator-checkbox__wrapper"><label for="forminator-field-consent-1_63564af9b88cd" class="forminator-checkbox" style="margin: 0;" aria-labelledby="forminator-field-consent-1_63564af9b88cd__label"><input type="checkbox" name="consent-1" value="checked" id="forminator-field-consent-1_63564af9b88cd" data-required="true" aria-required="true"> <span class="forminator-checkbox-box" aria-hidden="true"></span></label><div id="forminator-field-consent-1_63564af9b88cd__label" class="forminator-checkbox__label"><p>En cliquant sur le bouton ?&nbsp;Envoyer&nbsp;?, j’accepte que les données entrées ci-dessus soient utilisées pour le traitement de ma demande.</p></div></div></div></div>

    As a difference I see that in the English (not working) form there is an additional : tabindex="-1" aria-invalid="false"
    I have no idea if that is related ?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @mireille76

    I hope you are doing good today.

    I was trying to test TranslatePress but Automatic Translation, but Google Translate API Key force me to use ” Cloud Translation API” which is a paid option. Also, DeepL is a paid option. Let me know if I missing something.

    I guess you use “Enable Automatic Translation” and with that on a different language form does not work well?

    Kind Regards,
    Kris

    Thread Starter mireille76

    (@mireille76)

    Hi Kris,

    Thank you for your reply.

    I do not use automatic translation. I do the translations manually. I manage to well translate the form. The problem is that in the translated form I get an error “This field is required. Please check it” on the “Consent” field, when this field is set as required (even if the field is checked during submission).

    Thank you in advance for your help.
    Kind regards,
    Mireille

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @mireille76

    Thanks for response!

    I tried again on my test site with manually translated page (that contains a form with consent field) but still couldn’t trigger error.

    I’m thinking that there is some additional aspect/factor involved in this (perhaps some “detail” related to translation) but so far I’m missing what it could be.

    Would you mind sharing a link to the page with the form on your site so we could check it there (try submitting it, check page source and look into browser console when submitting)?

    It would also be great if you would share the form itself. You can export the form by using “Export” option under a little “gear” icon menu next to the form on “Forminator -> Forms” page. To share exported code (it will not! include any submissions so no worries about exposing those) it’s pest to put it on pastebin.com service or your Google Drive, Dropbox or similar file hosting account and just share a link to it in response below.

    This would help us further investigate the case.

    Best regards,
    Adam

    Thread Starter mireille76

    (@mireille76)

    Hi,

    Thank you for your answer.

    I installed a copy of the website (in which I removed most of the pages for privacy reasons).
    Here is the form in the original french language that works fine:
    https://sitetest.instants-presents.lu/contact/
    and here the translated english form that triggers the error:
    https://sitetest.instants-presents.lu/en/contact/

    And here is the export code : https://pastebin.com/Xp9V7i8T

    If it can help, I can give you admin access to this site. In this case just tell me how to transmit you the password, as I don’t want the password to be visible for everyone.

    Thank you very much for your help.
    Kind regards,
    Mireille

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @mireille76,

    Thanks for sharing the form export; I could replicate the issue when further investigated.

    I’m escalating this further to our developer’s attention in order to check what might be causing it. This might be more of a compatibility issue.

    Please do note that developers work on complex queries and have a slow response time. We’ll keep you posted once we get further feedback.

    Kind Regards,
    Nithin

    Thread Starter mireille76

    (@mireille76)

    Hi,

    Thank you for the investigations and for keeping me informed when you get feedback from the developers.

    Kind regards,
    Mireille

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @mireille76,

    Could you please try the following snippet and then check whether it works fine?
    https://gist.github.com/wpmudev-sls/d1e1b64e21fa4cce14921cedd892f811

    You can implement the above code as a mu-plugins. Please check this link on how to implement the above code as a mu-plugins:
    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Kind Regards,
    Nithin

    Thread Starter mireille76

    (@mireille76)

    Hi Nithin,

    Thank you very much.
    I implemented your code as mu-plugins, and now the form works fine.

    Thank you for the great form and the great support.

    Kind regards,
    Mireille

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Forminator Translatepress Consent Field error’ is closed to new replies.