I am working on a project that needs a "Smart Form" type of system. That is, we need to have a Form Template system that chooses what elements of the form are displayed based on how the user answers other elements of the form. Does that make sense? Can anyone point me in the right direction?
on 2007-03-06 17:42
on 2007-03-06 18:12
On Tue, Mar 06, 2007 at 05:42:32PM +0100, Aaron Wieberg wrote : > That is, we need to have a Form Template system that chooses what > elements of the form are displayed based on how the user answers other > elements of the form. You mean for instance, that if your customer has checked the box 'children', a form for the names of the children appear? I had the same work to do for my project. I have written my own helpers which simply render partials with rjs (page.replace, etc.), or calling :oncomplete for auto_complete fields, etc. You can have a look to the krjs plugin (http://choonkeat.svnrepository.com/svn/rails-plugins/krjs/) which is pretty useful but a little bit difficult to customize (you might want rewrite all completly). By the way, I've got trouble with tabulars and page.replace but the problem was solved on this mailing list a couple of weeks ago. Have fun, -- ,========================. | Pierre-Alexandre Meyer | | email : firstname.lastname@example.org | `========================'