webCtrl = NWF$("#"+reqFields[index]);
I checked all of above, finally, all of them are failed to set readonly.
Does anybody know how to do this.
I want to set readonly for input, rechtext, checkbox, select and radio.
Solved! Go to Solution.
This is maybe a start
You could always use the built in rules editor to set the controls to "disabled" which works in many such cases. This is much easier than setting the JS for each, but depending on your req you will know which method is best.
Hi Mike M san
Thank you for your reply,
I know the rules help this function. Before i post this question, I tried the rule for set readonly, however the rule did not worked and i gave up to implement this fuction by rules.
It is my personal opinion, validations and rules on Nintex Forms are very delicate functions.
First time both of them work well, then re-publish the form without any change and they are not worked.
There are many case of above in my environment, so I want to know work-around way.
You can try to set the disabled attribute to the textbox. Example as shown
NWF$("#" + txtbox).attr("disabled", "disabled");
Are you getting the correct dom object. You need to debug to check if you are setting that attribute to the correct dom element. I tried on a text box in my form. it works perfectly. I notice you are trying to select webCtrl = NWF$("#"+reqFields[index]); so debug and check if the webCtrl is the correct dom object.
Can you post an example of a Form Editor rule you are attempting to use that worked the first time, but not the second time? It might have to do with the type of reference you are using within the rule.
HI Mike san
thank you for your reply. Before I post mine, please tet me confirm about below.
The readonly attr have any restrictions?
Once I checked, readonly acts text control only.
It it is yes, I have to do by rules.