Sometimes, we want to fix disabled form inputs not appearing in the request with HTML.
In this article, we’ll look at how to fix disabled form inputs not appearing in the request with HTML.
How to fix disabled form inputs not appearing in the request with HTML?
To fix disabled form inputs not appearing in the request with HTML, we can replace the disabled
attribute with the readonly
attribute.
For instance, we write
<input type="textbox" name="Percentage" value="100" readonly="readonly" />
to set the readonly
attribute to readonly
to disable the input while allowing its value to be submitted.
Conclusion
To fix disabled form inputs not appearing in the request with HTML, we can replace the disabled
attribute with the readonly
attribute.