disabling the dropdown using jquery


Badge +6

NWF$('.controlclass').prop('disabled',true); when i used this property the control is disabling but when i clicked the save button its not saving any value.for dropdown and check box


5 replies

Badge +9

Hi Bharathi S‌,

Default save button wont allow to save you disabled control values. what you can do

1. Use rules to hide/show the control to only specific people.

2. Use control settings - Appearance - Enabled - Put your expression.

204642_pastedImage_1.png

3. Write code to Enable it and add to the Form Settings - Custom Javascript .

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

Thanks,

Lakshmi Narayana C

Badge +6

for the text box if i made readonly then its saving the value like that any property is there for dropdown and check box

Badge +9

try with NWF$("#" + control).attr("disabled", false);

You can use rules to set the controls to disabled which works in many such cases. It will be much easier than setting in JS.

Badge +6

i have to change the values of the drop down using jquery if i am using the rules i am doing manually its working if i am handling through jquery its not working

Badge +9

204648_pastedImage_1.png  204649_pastedImage_2.png

Reply