Add magento2 – reCaptcha to the custom widget form (2.3)

Suppose I created a form generator in the form of a widget. I'm trying to integrate the default captcha system into those widgets that have been added to a page, but I can not figure out exactly how to drag another block into a widget. How can I get it in there?

If you just load Google's reCaptcha PHP library and implement it yourself in the block.

forms – User-friendly error message for invisible reCAPTCHA

Lately we've been using invisible reCAPTCHA and recently reCAPTCHA v3.

Both are hidden and do not require the user to enter a code or tick a box to confirm that he is a user.

Thus, if for some reason an error occurs, the message may confuse the user (as in the appendix).

Normally, these errors are only displayed to a user if he does something to trigger Google's spam detection, such as: For example, filling out the form too fast or too slow, or from an IP range known for spam, etc. Even during the UAT shows a lot The same people register repeatedly to test a website.

What error messages do you use or suggest for this situation? Something generic like "There was an error processing the form, please try again" (since in most cases the human user will update and try again) it will probably work).

Would you like to know what others have done?

Enter the image description here

Free Google Recaptcha for Magento 2 – Advertising, Offers

With Advanced Form for Magento 2, administrators can create many forms of web forms with eleven useful fields to collect customer information to meet your marketing needs. You can easily create your own forms tailored to your business purposes.

Advanced Form – Features

Unlimited number of forms created

Automatically create e-mail template while the form is being created

Generate the display page when creating the form
11 super-exciting input types for each field (text, text area, file, image, drop-down list, radio, checkbox, multiple selection, date, memory view, product) to choose from

Support data storage and send emails after submitting the form

Ability to configure the Send Mail window with the e-mail template, recipients, and fields to configure

Allow the form to add CAPTCHA code
Configuration of the display page similar to the creation of a CMS page
Create your own template to display the form with available shortcuts


8 – reCaptcha is not displayed

I've installed Captcha and reCaptcha in Drupal 8 because I want to use it on the site's contact form. I think I set all configuration options correctly, but they are limited. For example, there is no place to say which form I want it to be.

All modules and the core are up to date.

I'll log out to test the form. I know that by default administrators will not see the reCaptcha.

I work with image-based reCaptcha v2.

I searched for a field widget that can be added to the form, but there is nothing. There is also nothing in the form display settings.

There used to be a list of forms to choose from (see screenshots on this question: how can I tell Captcha that my form is there?), Which is no longer displayed.

The instructions even refer to the missing list:

There is no list!

While reCaptha has a stable release for 8, Captcha released only a February 2017 beta release. I'm wondering if anyone else in 8 works at all.

Any suggestions? More troubleshooting steps I can take?

8 – How can I customize the Captcha / ReCaptcha error message?

I want to change how the error message appears when a user does not meet the Recpatcha error.

Right now it's just text over my form, but I'd rather have it modal or at least red.

I checked the template folder in both the Captcha module and ReCaptcha, but found nothing for the error message.

Is there a way to make the error message?