You can use the DISABLED attribute to turn off input for elements, for example:
| <INPUT TYPE=TEXT NAME=foo DISABLED VALUE='bar'> |
One side effect is that this attribute is not recognized by Netscape, so those users will still be able to edit the text. Also, FORM elements marked as "disabled" are removed from the collection, so the page you're posting to won't be able to collect the value (a messy workaround would be to also place the value in a HIDDEN element).
A workaround for all of this is to use the READONLY attribute, for example:
| <INPUT TYPE=TEXT NAME=foo READONLY VALUE='bar'> |
This will solve both side effects mentioned above. However, some have noted that this doesn't change the appearance of the field (it still *looks* editable). To do this also, you can add a style to the field (which, admittedly, will only work in certain browsers):
<INPUT TYPE=TEXT NAME=foo READONLY VALUE='bar' STYLE='color:#999999;background:#DEDEDE'> |