I want to use basic-captcha in a form.md (for several reasons I don’t want google’s reCaptcha). Now I get the crikey “RuntimeException: No secret provided”. I think I don’t need a secret for basic-captcha?!
I think I don’t need a secret for basic-captcha?!
I think you’re right…
Using a fresh install of latest Grav:
Created a contact form
Followed the docs for the Basic Captcha field:
- Added the Basic Captcha field to the form
- Added the proper process entry to the form
--- title: Basic Captcha form: name: captchaform fields: name: type: text basic-captcha: type: basic-captcha placeholder: copy the 6 characters label: Are you human? buttons: submit: type: submit process: basic-captcha: message: Humanity verification failed, please try again... ---
Form is working fine.
Thank you so much! I learned that the NAME of the element (not only the TYPE) has to be ‘basic-captcha’ and not ‘captcha’, which is to me a little bit unexpected. My (not working) version was:
captcha: type: basic-captcha placeholder: copy the 6 characters label: Are you human? buttons: submit: type: submit value: Submit process: captcha: message: Try Again!
@geradok, I don’t think your assumption is correct. It is the name of the process variable that must be
basic-captcha. That process variable tells the form how the submitted form should be processed.