Click to See Complete Forum and Search --> : readOnly elements


Superfly1611
01-24-2004, 12:42 PM
Hello
A question for you all....
I have a web form which when submitted needs to be approved.
I want to show the approver a copy of that web form but do not want him to be able to change the values of any of the elements
adding the readOnly property only seems to work for textboxes and textareas
I dont want to disable the elements cause then they look horrible and grey.
Suggestions?
I was thinking perhaps putting some kind of invisible barrier( a span perhaps) accross the form.... would that work?

fredmv
01-24-2004, 12:50 PM
Using the disabled attribute is probably the most practical way — I mean, that's what it's there for. You're going to have to sacrifice visuals for functionality I suppose, and even still, the fact that it looks "grayed out" is good — that's how the user knows it's disabled.

PhillMc
01-24-2004, 03:29 PM
Fred's right. DISABLED is the most pratical way. If you dont like the 'greyish' color of a disabled tb, change it's background color with CSS.

ray326
01-24-2004, 05:35 PM
You've obviously got some server-side processing going on so when you present the information for approval, don't put it into form widgets. Alternatively, load the page up with a set of hidden fields containing the original values and disregard the widget values except for the one that indicates approval or rejection.