RE: Best Approach for Survey Question
I thought that when I made it the first time :-) Russ -Original Message- From: Rick Colman [mailto:[EMAIL PROTECTED] Sent: 02 January 2006 17:52 To: [EMAIL PROTECTED] Subject: RE: Best Approach for Survey Question This is a very cool approach to doing it. Thank you. -Original Message- From: Snake [mailto:[EMAIL PROTECTED] Sent: Monday, January 02, 2006 9:33 AM To: CF-Talk Subject: RE: Best Approach for Survey Question I once made a form build that could be used for pretty much anything, profiles, questionnaires, anything that required a form. It was constructed something like thus:- Table: questions questionID int primarykey Questionvarchar Fieldtype varchar Requiredbit default(0) Sizeint Maxlength int Validation varchar Multiplebit default(0) Table: answers answerIDint primarykey questionId int Answer Table: Options optionIDint primarykey Optiontext varchar Optionvalue varchar DefaultSelected BIT default(0) So then you just loop over the questions, creating the specifield form field types with the specified attributes. For select lists, multi radios or checkboxes, you just add items to the options table. E.G. Select * from questions Select * from questions #optiontext# # Get the idea? Then when the form is submitted you simply save the answers in the answers table for the specified QID. -- Russ -Original Message- From: Dave Francis [mailto:[EMAIL PROTECTED] Sent: 02 January 2006 15:43 To: CF-Talk Subject: RE: Best Approach for Survey Question ALWAYS use separate columns. I've been bit in the a$$ just about every time I tried the comma-delim list approach. Another plus is it's really easy to return an Excel file directly to those doing the tabulating - which they seem to like - without bugging me for the "latest results" 3 times a day. -Original Message- From: Richard Colman [mailto:[EMAIL PROTECTED] Sent: Sunday, January 01, 2006 9:14 PM To: CF-Talk Subject: Best Approach for Survey Question I am trying to determine the best way to structure a series of survey questions, keeping in mind that I need to make it easy to use for the respondent, easy to code, and easy to tabulate the data later on. I can structure the following typical question as a single set of checkboxes: Q5: Please select schools that provide interns (check all that apply): [ ] Sciences [ ] Management/Business [ ] Law [ ] Communications [ ] Other Using a single datafield for the question, I then would need to parse a comma-delimited list to separated the answers. - or - I can use a series of radio buttons: Q5:Please select schools that provide interns (check all that apply): A. Sciences [ ] B. Management/Business [ ] C. Law [ ] D. Communications [ ] E. Other [ ] If I use a separate data field (5 in this case) for each sub-part of the question, then it is easy to tabulate results for each part. Recommendations appreciated. Richard Colman ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228141 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Best Approach for Survey Question
I once made a form build that could be used for pretty much anything, profiles, questionnaires, anything that required a form. It was constructed something like thus:- Table: questions questionID int primarykey Questionvarchar Fieldtype varchar Requiredbit default(0) Sizeint Maxlength int Validation varchar Multiplebit default(0) Table: answers answerIDint primarykey questionId int Answer Table: Options optionIDint primarykey Optiontext varchar Optionvalue varchar DefaultSelected BIT default(0) So then you just loop over the questions, creating the specifield form field types with the specified attributes. For select lists, multi radios or checkboxes, you just add items to the options table. E.G. Select * from questions Select * from questions #optiontext# # Get the idea? Then when the form is submitted you simply save the answers in the answers table for the specified QID. -- Russ -Original Message- From: Dave Francis [mailto:[EMAIL PROTECTED] Sent: 02 January 2006 15:43 To: CF-Talk Subject: RE: Best Approach for Survey Question ALWAYS use separate columns. I've been bit in the a$$ just about every time I tried the comma-delim list approach. Another plus is it's really easy to return an Excel file directly to those doing the tabulating - which they seem to like - without bugging me for the "latest results" 3 times a day. -Original Message- From: Richard Colman [mailto:[EMAIL PROTECTED] Sent: Sunday, January 01, 2006 9:14 PM To: CF-Talk Subject: Best Approach for Survey Question I am trying to determine the best way to structure a series of survey questions, keeping in mind that I need to make it easy to use for the respondent, easy to code, and easy to tabulate the data later on. I can structure the following typical question as a single set of checkboxes: Q5: Please select schools that provide interns (check all that apply): [ ] Sciences [ ] Management/Business [ ] Law [ ] Communications [ ] Other Using a single datafield for the question, I then would need to parse a comma-delimited list to separated the answers. - or - I can use a series of radio buttons: Q5:Please select schools that provide interns (check all that apply): A. Sciences [ ] B. Management/Business [ ] C. Law [ ] D. Communications [ ] E. Other [ ] If I use a separate data field (5 in this case) for each sub-part of the question, then it is easy to tabulate results for each part. Recommendations appreciated. Richard Colman ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228138 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Best Approach for Survey Question
ALWAYS use separate columns. I've been bit in the a$$ just about every time I tried the comma-delim list approach. Another plus is it's really easy to return an Excel file directly to those doing the tabulating - which they seem to like - without bugging me for the "latest results" 3 times a day. -Original Message- From: Richard Colman [mailto:[EMAIL PROTECTED] Sent: Sunday, January 01, 2006 9:14 PM To: CF-Talk Subject: Best Approach for Survey Question I am trying to determine the best way to structure a series of survey questions, keeping in mind that I need to make it easy to use for the respondent, easy to code, and easy to tabulate the data later on. I can structure the following typical question as a single set of checkboxes: Q5: Please select schools that provide interns (check all that apply): [ ] Sciences [ ] Management/Business [ ] Law [ ] Communications [ ] Other Using a single datafield for the question, I then would need to parse a comma-delimited list to separated the answers. - or - I can use a series of radio buttons: Q5:Please select schools that provide interns (check all that apply): A. Sciences [ ] B. Management/Business [ ] C. Law [ ] D. Communications [ ] E. Other [ ] If I use a separate data field (5 in this case) for each sub-part of the question, then it is easy to tabulate results for each part. Recommendations appreciated. Richard Colman ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228132 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Best Approach for Survey Question
Not quite sure what your question is... whether or not you should use a comma delimited list of items or a separate record for each? If that is your question most definitely a separate record for each question AND answer Here's a script I use for building the necessary tables for a survey app I did... It can house multiple surveys, multiple questions per survey, and multiple answers per question. At the 'question' level, you define the form field type to use for that particular question. Eg... radio (single answer), checkbox (multiple answers), text, textarea... The backend has everything you'd need... including reports and it all works great with this database schema. There is only one type of answer that I haven't put in it and that is a question with multiple answers but each of those answers would have multiple answers themselves... It would be used for rating each answer to one question. Something like... Rate These Answers: One [bad] [good] [great] Two [bad] [good] [great] Three [bad] [good] [great] Email me offlist if you'd like to see the app and its administrative tools in action. == srv_globals.cfm = request.surveydsn = "surveyapp"; request.tblprefix = "tbl_survey_"; request.debugon = "yes"; request.imageroot = "http://#cgi.server_name#/images";; request.webroot = "http://#cgi.server_name#/surveys";; === msaccess_tbl_script.cfm == create table #request.tblprefix#as ( answerid counter primary key , questionid number , surveyid number , answer text(250) , fieldtype text(50) , sortid number ) #request.tblprefix#as was created successfully #request.tblprefix#as already exists create table #request.tblprefix#qs ( questionid counter primary key , surveyid number , question memo , fieldtype text(50) , sortid number ) #request.tblprefix#qs was created successfully #request.tblprefix#qs already exists create table #request.tblprefix#faqs ( faqid counter primary key , faqquestion memo , faqanswer memo , sortid number ) #request.tblprefix#faqs was created successfully #request.tblprefix#faqs already exists create table #request.tblprefix#results ( resultid counter primary key , submitid number , surveyid number , questionid number , answer memo ) #request.tblprefix#results was created successfully #request.tblprefix#results already exists create table #request.tblprefix#submits ( submitid counter primary key , surveyid number , dateadded datetime , fname text(20) , lname text(20) , address text(150) , address2 text(150) , city text(50) , state text(20) , zip text(15) , comments memo , emailaddr text(150) , contactme number ) #request.tblprefix#submits was created successfully #request.tblprefix#submits already exists create table #request.tblprefix#surveys ( surveyid counter primary key , surveyname text(250) , activesurvey number , dateadded datetime , confirmation memo ) #request.tblprefix#surveys was created successfully #request.tblprefix#surveys already exists ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228120 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54