Read-Only Vs Disabled

File this under the “I never realized it worked that way” bin.

This is probably HTML 101, but I've never realized the difference between a “read only” textbox and a disabled textbox in an HTML form.

A read only textbox can get focus and users can copy text from the field. But most importantly, a read only textbox will be posted along with the rest of the data in a form. Meanwhile a DISABLED textbox cannot get focus, so you can't copy data from the field and it WON'T be posted with the rest of the field.

I can't believe I never knew that or at least ran into a situation that would have forced me to learn it.