"Select all that apply" Check Boxes

Capo

Registered User.
Local time
Today, 14:56
Joined
May 29, 2007
Messages
33
How do you setup your tables to handle "select all that apply" questions in a survey? Must you have a field for each possible option and then flag it yes/no or is there a better way to do this?

Thanks!
 
If it's something like, "What sort of movies to your like? (Select all that apply):" and that's followed by a list of movie genres (comedy, horror, action, etc.), then yes, each genre is its own checkbox. There are far more complex ways to handle this (bit-wise, for example), but that's not really the intent here I don't think.
 
Yes, basically the point is to allow a user to select multiple options as apposed to just ONE option.

But you're saying that the best way to do this is to create a seperate field for each possible answer? Such as, if it's question 18, do q18A, q18B, a18C, etc?
 
Correct. And don't store it all in one table -- you need normalization. Otherwise, you'll have one question with three possible options, another with six, and so on. That's not fit for one table.
 
Just a follow-up here.

I have created a child table to populate my options for my question. I changed the question type to a list box and am getting the answers to populate correctly in the list box.

I assume I also need to change the Multi-Select option under properties? If so, do I go with simple or extended?

And finally, my main question is how do I get it to actually store the data? Where exactly do I create those extra fields for storage of the answers?
 
I'm working on a similar problem, so this could be wrong...

I think what you need to do is, for each 'check all that apply' question create a new table with a 1-many relationship (1 child in the 'child' table, many answers in the answer table, with a unique identifier for the child as PK in child table and FK in answers table).

I can't help you with the multi-select bit though, I'm afraid!
 

Users who are viewing this thread

Back
Top Bottom