I thought they could be, but as I\'m not putting my money where my mouth was (so to speak) setting the readonly attribute doesn\'t actually seem to do anything.
I\'d
Belated answer, but most answers seem to over complicate it.
As I understand it, the OP was basically wanting:
It should be noted that:
disabled
attribute, because they 'want the checked check boxes to be submitted with the rest of the form'.yes
or false
, but can be any text.Therefore, since the readonly
attribute does not work, the best solution, requiring no javascript, is:
So for a checked checkbox:
For an unchecked checkbox:
The main problem with disabled inputs, especially checkboxes, is their poor contrast which may be a problem for some with certain visual disabilities. It may be better to indicate a value by plain words, such as Status: none
or Status: implemented
, but including the hidden input above when the latter is used, such as:
Status: Implemented