Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
It would be great having Conditional Logic in captcha elements, as for other regular webform element (select, text, etc...).
For exemple, I have a "subscribe to newsletter" bloc which only display an email field, but then display other (required) fields as soon as a user begin filling it.
Thanks.
Conditional Logic exemple options:
Actual captcha element options:
Comment | File | Size | Author |
---|---|---|---|
#4 | Screen Shot 2017-06-28 at 6.00.31 AM.png | 88.85 KB | jrockowitz |
Capture d’écran 2017-06-27 à 14.32.44.png | 26.48 KB | camdarley | |
Capture d’écran 2017-06-27 à 14.32.28.png | 72.79 KB | camdarley |
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedNot possible because conditional logic is all client-side and does not disable the CAPTCHA element.
Comment #3
camdarley CreditAttribution: camdarley as a volunteer commented@jrockowitz Sorry to re-open this and I understand your point, but the goal here isn't to disable the captcha, but only to toggle visible/invisible states.
Waptcha element would still be present in html, only hidden with css/javascript until user fill another field.
Comment #4
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThe form won't submit if the CAPTCHA element is hidden, which will be very confusing for most users.
You can work around this, by adding a custom #states property to your CAPTCHA element, which will enable the 'Conditional Logic' UI
Comment #5
camdarley CreditAttribution: camdarley as a volunteer commentedPerfect, it works! I wasn't aware of this...
Many thanks!