I am using the following statement to make it readonly but it is not working.
$('#cf_1268591').attr("readonly", "readonly");
I don't want make it disabled, I want to make it readonly.
$('#cf_1268591'). attr("readonly", "readonly");
Dropdown (select element) is always read only. User do not edit it. User can select any of the option of its own chice. Unlike other html elements, it dont have a attribute which can make the element readony and prevent users to change its value.
Try this: $('#form1 input'). attr('readonly', 'readonly');
Show activity on this post. TextBox. ReadOnly = false; for readonly.
$('#cf_1268591').attr("disabled", true);
drop down is always read only . what you can do is make it disabled
if you work with a form , the disabled fields does not submit , so use a hidden field to store disabled dropdown value
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With