I have a bootstrap select with readonly="true"
but I can still change the selected option.
I need the disabled="true"
behavior, but when I use this the select is not submitted.
I need a combination of the 2, the selected option can not be changed but the select has to be submitted.
I could use hidden fields, but I was hoping for an easier solution.
I've run into a similar issue and what i do is when the form onsubmit event is fired remove the disabled attributes as the browser will not post disabled attributes back to the server.
$('form').submit(function () { $('[disabled]').removeAttr('disabled'); })
As you mentioned the only other option i have found is to find the values to hidden inputs.
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