[jifty-devel] how to do it ?

mraptor mraptor at gmail.com
Mon Feb 19 19:27:29 EST 2007


Last days I was experimenting creating a complex form in many different
ways w/o finding a good solution... :(
What I want to do is a form with approximately 60-70 fields which then
have to be written in 5-6 different tables.
The slowest and most obvious way to do it should be to 
define the fields into the Model, then define them in the Action and 
finally because the FORM has to be divided into sections, list them
in every section in the template i.e. :

for my $fieldName (qw(f1 f2 f7 f12..)) { .... }

and so on for each separate sections..so that I can order them in nice
As you may see this way is not that scalable. For any small change I
have to edit at a minimum 3 files ! Possibility for error is great.
The problem goes even bigger when I have to redefine field that may
contain 5-10 <options> (even worse if i want to specify them like
a hash-pairs display/value }

Let me remind you that I cant just inherit Jifty::Record (so that i also
inherit some of the schema-definition) bacause I will have 5-6
different record-objects. 

So in short these are my questions ;)

PS. One more quick question. Do you have any quick method to switch from
'valid'-list -to-> "refers_to db-table"

Gee I don't have signature

More information about the jifty-devel mailing list