Captcha: Enable Disable by User Group

How to enable or disable CAPTCHA based on user group in ChronoForms.

Overview

The issue arises when needing to show CAPTCHA to guests but hide and disable it for registered users without creating separate forms.
Use an Event Switcher with a Load JavaScript action to disable the CAPTCHA input field for registered users, allowing the form to skip validation for that group.

Answered
Ni NickOg 06 Feb, 2016
Hi
Can anyone tell me a simple way to enable and disable Captcha?

On an application form I want to show & enable Captcha for guests and hide and disable Captcha for registered users. I can use event switcher on load to control the visibility of the Captcha box and on submit to control whether Captcha is checked. But I can't work out how to disable the validation or disable the related Captcha input box. I assume that I should do that using javascript but being a javascript novice can't work out the path to the node or how to then disable it.

Is there simpler way - other than two versions of the form???

Regards

Nick
Gr GreyHead 07 Feb, 2016
Answer
Hi Nick,

This seems to work - add it into a Load JavaScript action in your EventSwitcher
jQuery(document).ready(function (jQ) {
  jQ('input[name="captcha"]').prop('disabled', true);
});

Bob
Ni NickOg 07 Feb, 2016
Thanks Bob - works a treat. One day I will go learn JS & JQ. One day.

Nick
This topic is locked and no more replies can be posted.