I have seen people recommending
<input name="input" readonly="readonly">
and
<input name="input" disabled="disabled">
But which of these two will:
- Stop users changing the value
- Allow jQuery to update the value
I have seen people recommending
<input name="input" readonly="readonly">
and
<input name="input" disabled="disabled">
But which of these two will:
Use readonly
, because disabled
will also prevent the field from being submitted.