I want to be able to set an option in a Field after it
has been constructed, i. e. Field should get a method
This effect could be accomplished by
def setOption(self, name, value):
self._options[name] = value
in the Field class.
Motivation: Mostly, fields are made once, upon
construction of a FieldDefinition and don't change
after then. However, I have an (or several) situations
where I go through a form and then a preview page to
look at a formatted version of the entered form data
and to confirm that it should be put into the database.
Apart from a submit button, the preview page contains
all the form data from the previous form but as hidden
fields. So I want to use - almost - the same fields
(escpecially including their ValidatorConverter s) for
the form but with the 'hide' option set to 1. I build
my form definitions as mutable ones on the fly, so
there's no problem in modifying a list of Field s. (I
make a copy of the field list.)
Let me know if you need more info.
Log in to post a comment.