I need help fleshing out an idea for a form
I have a form I build for my agency that adds records to a database. It's sort of an online survey that's used by different offices within my agency, and it's "recycled" every year or so.
It consists of some info fields for the user filling it out (name, organization, etc) that are always there, but it also has some textarea fields that change whenever it's "recycled".
It's a large form with a lot of serverside error checking, and it's a bit tedious to recode the HTML (not to mention the target page) everytime the form gets recycled, so I had an idea.
My idea was to create a table in the database for the form, and have the following columns:
field_type (i.e. text, textarea, etc)
field_name (for the name="" of the input tag
field_label (for the <label> tag)
field_size
field_order (so I can control the order that the fields show up)
Then use a query to have my CF page dynamically build the form.
While I'm pretty sure the above would work, I'm not so sure how to code the target page, since the FORM.names won't remain the same. I thought about tying to capture all the form fields in some sort of array, but I'm not really sure how to do that. Any ideas?
