Survey forms

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
getmizanur
Forum Commoner
Posts: 71
Joined: Sun Sep 06, 2009 12:28 pm

Survey forms

Post by getmizanur »

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.
Post Reply