DoSomething / forge

🎨 The DoSomething.org pattern library.
http://forge.dosomething.org
MIT License
48 stars 14 forks source link

Update disabled input to include readonly #552

Open weerd opened 8 years ago

weerd commented 8 years ago

The disabled attribute in inputs is styled by Forge to appear greyed out. Would be useful to also include the readonly attribute with the same styling.

The benefit of the readonly attribute is that it still allows the form to submit the hardcoded value (say for example in a form which adds a value to an input based on IDs or something in the system; real-world example happens in Gladiator).

Whereas with the disabled attribute, any value in the input is not submitted via the browser as a value for the field.