I’m curious to see how others are dealing with the construction of
multi-page forms. I can see a couple of ways to do this, each with
their own advantages/disadvantates.
- define one table with columns for each form entry.
- define a method/view for each page, which only displays a subset of
- submitting a page saves the data and moves on to the next page.
This one strikes me as a brute force solution, but may avoid many
It may also result in tables with a huge number of columns for complex
- define several models and controllers that correspond to each page and
put them under another controller. (i.e., form/page1/new)
- define the form model that basically just has several has_one
relationships with instances of each page
This one may be a little more logical, but it sacrifices some
flexibility. If you want to change the page layout, you may need to
move columns to a different table.
- define the form structure through a table, with individual field
entries being stored in another table
This is much more complex and may not be worth the effort.
Any other approaches in use? Any particular preferences in this regard?