Forms. Using Google Recaptcha in forms

Google Recaptcha v3 allows you to transparently, without manual checks, check the user for a bot.

How to configure recapchu

To use Google Recaptcha, follow these steps: 

1. Get secret and public keys on the Recaptcha service (v3): 

2. Adding keys to the settings (as_settings) with the codes recaptchaPrivateKey, recaptchaPublicKey

3. In GetLayout Select 1 we add the parameter recaptchaPublicKey:  dbo.as_setting('recaptchaPublicKey', '') recaptchaPublicKey

4. Put the form in GetItem SELECT 2 1 EnableRecaptcha

5. As a result, when saving the form, a transparent check will be performed with access to an external Google Recaptcha service. 

Disabling recaptcha

  • If you need to disable recaptcha for a specific form use 0 EnableRecaptcha in GetItem SELECT 2 for form. 
  • To completely disable recaptcha on the site, just make the recaptchaPublicKey parameter empty in GetLayout SELECT 1, and clear the settings recaptchaPublicKey  and recaptchaPrivateKey. 

Internal recaptcha parts

  • The input[type=hidden]#as-g-recaptcha field stores the user's token value (it is reinitialized each time the field is saved). 
  • Checking for the bot occurs in the form before calling the CheckItem procedure. 
  • You can change the message about blocking from Google - to do this, specify the value in The lang label with the code invalidRecaptcha (part empty).
  • token is passed to the form via an additional parameter with the recaptchaToken code in the collection of fields. After verification, it is immediately deleted from the collection. 
  • if you run the app locally, the recaptcha will be disabled and the hidden field will not be added to the page.

Falcon Space is a functional web development platform on a narrow stack MS SQL/Bootstrap. Falcon Space Gettting started

Falcon Space Platform

This is a reduction in the cost of ownership

at the expense of fewer people to support

This is a quick change

while using the program

This is a modern interface

full adaptation for mobile devices