Forums

Captcha: Enable Disable by User Group

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
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
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.