You would use the following code:
<p>2. Which of the following flavors have you tried in the past?</p>
<p>
<input type="checkbox" name="Q2_1" value="1" />Chocolate<br />
<input type="checkbox" name="Q2_2" value="1" />Vanilla<br />
<input type="checkbox" name="Q2_3" value="1" />Strawberry
</p>
Note that the name is the different for each option, while the value remains the same for each, which is the exact opposite of what we did for Radio Buttons. Why? For a Radio Button question we want the data to be input into the same data column, regardless of which option the respondent checks. On a Checkbox question, we want the data from each option to be input into its own dedicated data column. In this case, if a respondent checks Chocolate and Strawberry, a 1 will be input into columns Q2_1 and Q2_3. Of course, you'll need to be sure to set up a data column for each potential response.
Return to Web Survey Tutorial index
Contact Scott Spain with Web site questions and feedback.
©Copyright 2008 by Venture Data. All rights reserved.
Site Sponsors: Venture Data and W3 Surveys
Thursday, August 7, 2008