The HTML standard for forms appears to be such that disabled input elements do not contribute to the form name/value collection.
Is there ANY way to get around this?
Instead of setting field as disable set readonly attribute to "readonly " like shown below.
readonly=readonly
this will send your field value in form submit.
You can easily
reset input status to disabled
$(element).prop("disabled", false); var text = $(element).val(); $(element).prop("disabled", true)
The HTML standard for forms appears to be such that disabled input elements do not contribute to the form name/value collection.
That is correct.
HACK: You could use Javascript to, upon submit:
I suppose this is a hack, but seems to work well for me. Do both! User sees disabled input, clearly ghosted and browser prevents interaction - but it is not submitted with form. The user doesn't see the potentially disorienting readonly field, yet it is submitted with the form.
<input name="mode_d" size="8" value="mode" disabled>
<input name="mode" value="mode" hidden readonly>