elloo,
I have clients who needs to create dynamic form for gathering information (survey). the survey form fields can be specified by client, something similar to "google doc spreadsheets form". Also, I need to be able to store submit data on the database.
So far, I have managed to think of the following table structure (not using the correct syntax, for demonstration only)
create table form (
id int primary key,
name varchar,
visible char
)
create table question (
id int primary key,
title varchar,
help_text varchar,
form_id foreign key(id) references form
)
create table form_field (
id primary key,
name varchar,
type varchar,
question_id foreign key (id) references question
)
create table form_submit (
session_id varchar,
answer text,
question_id foreign key (id) references question
)
How do I add "select" (dropdown) field to form_field? Also, feel free to criticise the table structure if you feel it is wrong.
Thanks in advance.
Survey forms
Moderator: General Moderators