AnsweredAssumed Answered

Choice Field Drop Down Values - Disable JS not working

Question asked by lonegijoe on Nov 5, 2018
Latest reply on Nov 8, 2018 by jpmhuls

I am attempting to disable values within choice drop down fields in Nintex Classic.


The issue is this:

I applied the following javascript to the customer javascript section in the form settings menu and it is NOT working.  Meaning, when I publish the form and then edit the item I still see the values I do not want them to select. I need the users to select certain values but be able to see other values that would be applied by workflow from other list,etc but not be able to update certain value themselves.


@I have to be missing something simple.


Fields have a point value, 0 value, and a Report value in each field, not necessarily same order(considered using CSS with setfield value can be different for fields).







Here is what I have for the form custom javascript settings:

NWF$('.Test2 option[value="14"]').prop('disabled',true);
NWF$('.Test3 option[value="12"]').prop('disabled',true);
NWF$('.Test4 option[value="16"]').prop('disabled',true);
NWF$('.Test5 option[value="16"]').prop('disabled',true);
NWF$('.Test6 option[value="16"]').prop('disabled',true);
NWF$('.Test7 option[value="10"]').prop('disabled',true);



in formatting> CSS class for each control I added value of Test1 or Test2 ,etc to represent each control.  (if Test1, then I added Test1 ,   if Test 2 then I added Test2  to whatever CSS classes were already there.



I still do not have the values disabled.


Did I miss something? Thank you for any help!


Update: The custom CSS seems to work in Chrome but not in IE. Still can't get the Javascript to work.....

 .ttr option[value="12"] {display: none !important;}
.ttr option[title="12"] {display: none !important;}


Need form to hide the value in field in IE.