Skip to main content
Nintex Community Menu Bar

Disabling field using JavaScript doesn't work

  • April 27, 2020
  • 2 replies
  • 79 views

Forum|alt.badge.img+2

Hi, 

 

I have a field that I want to disable using JavaScript (meaning that the user can't click on the checkbox)

 

7616i6954D0C868524124.png

I tried using this

NWF$("#" + varIT).attr("disabled", true);

or this

NWF$("#" + varIT).prop("readonly", true);

but both didn't work.

 

What am I doing wrong?

 

 

2 replies

Forum|alt.badge.img+8
  • Novice
  • April 28, 2020

Hi,

 

not a jquery pro so there might be a better solution, but this works for me:

NWF$("#" + varIT + " input[type=radio]").attr("disabled", "disabled")

I noticed the whole "Choice" control is rendered as an html table containing radio inputs, so I disabled them after noticing that disabling the table didn´t do the trick


Forum|alt.badge.img+2
  • Author
  • Nintex Partner
  • May 3, 2020

Hi Tarf :)

 

sorry for the late reply.

I just tried it out and it works!

 

Thanks once again for your help!