storing data for frequently changing forms, how?

I am unclear if you mean to say that you don't want to alter the data
in the database each time, or the schema of the database each time.
If it is the schema, there are certainly good ways to make such a
system generic and be able to make such changes without it affecting
the schema.

I have done a similar schema in the past, and here is the schema I
would get started with:

  name (friendly name for the form)

  question_type (suggestions: text, single-select, multiple-select, etc)

  question_text ("please select your breed of llama")

  answer_text ("golden llama")


A note about how the answers work, if the answer type is one that
offers options, the available options are stored in answer_options.
in the answers table, if the answer is from a option list, it stores a
reference to the answer_option. However, if the answer_type is a text
one, it stores the text.

This is a bit of a hack, as you have to store the answer as a string,
even if its a reference to the an answer_option. There is probably a
more elegant way to handle that, but I am shooting from the hip here.

Good luck :slight_smile:

I have been working on something similar. I kindof used the general
schema of phpESP.

It is a survey application, but sounds pretty much in line with what
you are doing.

In essence, each answer type (int,date, boolean, etc) is stored in its
own table. Creating the forms dynamically havent been that
bad...I'll be curious when I get to the data retrieval for the

Hope that sheds a little light.