Forum: Ruby on Rails How to save data with dynamic forms?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
7595ff5e64d9a309c29932d106959973?d=identicon&s=25 Human Dunnil (Guest)
on 2006-04-23 00:32
(Received via mailing list)
Imagine I have a form designer, which allow me to design a web form (at
I don't have any idea how to save the data in db (table ddl?), so I can
easily list or search the data.

I though of writing the hash directly from the form to db, but I think
must be better solution(s)?

Any idea, articles or design pattern on the subject?

Thank you all in advance,
Fb23bc8cd4030c526b0689276b34c8bd?d=identicon&s=25 Bryan Duxbury (bryanduxbury)
on 2006-04-23 03:15
What's your schema look like for having run-time defined forms? I would
think something like:

form_type --< field
form --< field_value
field_value >-- field
form >-- form_type

(Like my whacky crow's foot notation?)

If this is the case, then each entry in your form is actually a row, so
you can use collection-based form helpers (<%= input "field_value[]"
...) and get it all done pretty easily. There's a section on using
collection forms in the Agile book.
This topic is locked and can not be replied to.