Problem/Motivation
At this moment, the error message the user gets when it enters an incorrect CAPTCHA answer ("The answer you entered for the CAPTCHA was not correct.") is hard-coded in the module. Sometimes this message does not really suit the situation.
For example: When using reCaptcha, the user cannot really answer a CAPTCHA. It can only check a "I am not a robot" checkbox. So the hard-coded message is not the best message you can give when a user forgets/fails to pass the reCaptcha check. A message like "Please verify that you are not a robot bij checking the "I am not a robot" checkbox." is a better message.
Proposed resolution
Add an extra textfield in the Captcha configuration field where you can enter a custom error message. A a consequence, the error should be translatable.
Remaining tasks
Add extra error message field in the configuration field.Show this error message when a users fails the CAPTCHA test.- Add/modify tests for this.
Comment | File | Size | Author |
---|---|---|---|
#14 | configurable message.png | 62.25 KB | guilhermevp |
#14 | config_message.png | 17.01 KB | guilhermevp |
#13 | 2959577-13.patch | 5.58 KB | paulocs |
| |||
#9 | CAPTCHA-settings-D8.png | 72.99 KB | keshavv |
#8 | configurable_captcha-2959577-8.patch | 3.27 KB | helmo |
|
Comments
Comment #2
BryanDeNijsI created a patch to implement the new configuration field.
The only thing that needs to be done is adding/modifying the tests, but I'm having troubles with this and I hope that someone can do this for me.
Comment #3
elachlan CreditAttribution: elachlan commentedComment #4
elachlan CreditAttribution: elachlan commentedNeeds re-roll.
Comment #5
vakulrai CreditAttribution: vakulrai as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedAdding a patch for tests.
Comment #7
couturier CreditAttribution: couturier as a volunteer commentedThis is a great idea. Is anyone able to help with the push to get this and other changes incorporated to a stable 8.x version? See discussion at attached link.
Comment #8
helmo CreditAttribution: helmo at Initfour websolutions commentedHere's just a re-roll of #2. The test code added in #5 nolonger applies as all tests were converted since then.
Comment #9
keshavv CreditAttribution: keshavv at gai Technologies Pvt Ltd commentedTest patch #8. working as excepted.
I think its ready to merge with the module.
Thank you.
Comment #10
keshavv CreditAttribution: keshavv at gai Technologies Pvt Ltd commentedComment #11
japerryThe tests definitely need revamping. Even after trying to reroll the patch, there are some bigger issues with how the error message is hardcoded in them.
Marking needs work so hopefully someone with some more time can take a look and get tests passing first.
Comment #12
paulocsI'll provide a patch.
Comment #13
paulocsAdded the feature and test coverage.
Comment #14
guilhermevp CreditAttribution: guilhermevp at CI&T commentedPatch work as intended. There is a configurable message and the message shows up when captcha answer is wrong.
Comment #15
japerryYah that looks better. Fixed!
Comment #17
BryanDeNijsThank you all for all the extra work and for committing it!
Comment #18
paulocs:)