Forum: Ruby on Rails Smart forms in Rails?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
13e45e748119e3c43fdc99fb873dfd15?d=identicon&s=25 Aaron W. (aaron)
on 2007-03-06 17:42
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?
Pierre-Alexandre Meyer (Guest)
on 2007-03-06 18:12
(Received via mailing list)
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 : pam@mouraf.org |
`========================'
This topic is locked and can not be replied to.