Well, my concept is slightly different.
My lEditMode is either .t. or .f.
For all situations other than Adding a new record or editing an existing one I keep the field DISABLED.
What is your VIEW mode about ?
P.S. At this early stage of my efforts at finding a final solution to a web page, I am not happy with the way a DISABLED control is displayed. It is so dim that it is difficult to read. I would use READONLY but not all controls have that property and I would like to be consistent with the user interface if possible. I am sort of assuming something will jump up as the solution. I am not ready (by a long shot) for prime time yet so I will keep investigating.
Sent by Alan Harris-Reid on 12/12/2002 02:58:41 PM:
>>When I was creating the HTML by hand I would put in <%= iif(lEditMode,"","DISABLED") %> inside the INPUT tag.
Is that what I will have to do here also ?<<
That's the way I do it, with lEditMode having the values ADD,EDIT or VIEW. If you find a neater way, please let me know.
I would, however, place the IIF() in a short-named UDF a) to save typing (I'm lazy), b) if the function changed, you would only have to change it once, not for every field.
If the HTML control is to be directly bound to an existing variable or field, I also dynamically create the 'name' and 'size' and 'value' arguments using a UDF.