B
B
Berkutman2018-12-21 18:18:41
Drupal
Berkutman, 2018-12-21 18:18:41

Attaching captcha to custom page?

Hello everyone, I created a custom page where php code is displayed. I would like to attach a modular captcha to this form (the screenshot is attached), I tried to insert the form ID, but the captcha is not displayed.
5c1d044b180ca355277080.png
What's in the code.
5c1d09e309fe8141305506.png5c1d09feea25e321191149.png
What's in the CAPTCHA module settings. Where the ID of the form fits, for which you need to check through the captcha.
5c1d0a088ff7c549190022.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
Zettabyte, 2018-12-22
@Zettabyte

If you are using the Captcha module ( /project/captcha) and the latest version of Drupal 8, then the problem may not be in your code.
Check issues and/or drupal.org or stackoverflow forums - I read some time ago (unfortunately, I don't remember where exactly) that due to changes in recent kernel versions, the work of this module has been severely broken.
PS
In addition, if I'm not mistaken, it is possible that if your form createceris created by a function, for example, function create_cer_form()then you must specify create_cer_form(function name) in the captcha settings.
But I have been interested in this issue for a long time, so the assumption needs to be tested in practice.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question