[Html-widget] Read-only attribute?

Michael Gray mjg17 at eng.cam.ac.uk
Wed Jun 21 17:06:25 CEST 2006


I'm starting to use HTML:Widget, so far so fun!

One of my intended uses is a multi-stage wizzard where various data 
fields can be either read-only or user-editable depending on the context 
and on the kind of user.

I could do this by hand in the code by choosing between a Textfield or a 
Span, but it would be much nicer if I could just add a "->readonly(1)" 
to the element and have it Do The Right Thing, taking care of outputting 
the label and the read-only value in a suitable fashion.

How much work would this be?  Any pointers or suggestions for a 
different approach?
 
Would it be useful to others?

Many thanks

-- 
Michael



More information about the Html-widget mailing list