I have a checkbox that, given certain conditions, needs to be disabled. Turns out HTTP doesn't post disabled inputs.
How can I get around that? submitting the input even if it's disabled and keeping the input disabled?
UPDATE: READONLY
doesn't work on checkboxes
You could use disabled="disabled"
but at this point checkbox's value will not appear into POST
values. One of the strategy is to add an hidden field holding checkbox's value within the same form and read value back from that field
Simply change disabled
to readonly