Creating Survey Questions

First, we'll create the questions that make up the survey. For any given question, there are a variety of user interface controls at our disposal that give participants a means of making a response. The choice of control depends on the style of question.

The first question on our survey asks respondents to indicate their sex. This is a multiple choice question with two mutually exclusive options. There are a few different controls we can use for this type of question - specifically radiobuttons, listbox, or dropdown. For this question, we'll use the dropdown control because of its space efficiency.

Here is the syntax for creating this dropdown survey item:

<dropdown sex>
/ caption = "Sex"
/ options = ("female", "male")
</dropdown>

The type of the element is dropdown. When users click the control, the list of response options "drops down", allowing them to click on their chosen option. The name of the item is "sex". We'll refer to this item by its name later on in the tutorial when we specify where the item should appear on the page. The caption attribute represents the question or instructions the respondents will see for that item. In this case, that caption is simply "Sex". Finally, the options attribute defines the response choices -- either "male" or "female" -- in the dropdown list. Pretty simple.

The next item will ask for the respondent's age. Since there are 100 or more possible responses to this question, a multiple choice format would be cumbersome. Instead, we'll use the textbox element, which simply allow users to type their age into a textbox (or as some call it, an edit box). Here is the definition of our age item:

<textbox age>
/ caption = "Age"
/ mask = positiveinteger
/ range = (7, 110)
</textbox>

Note the element type is textbox and the name is "age". This time, the caption says "Age". Since respondents occassionally make mistakes when typing, we want to make sure the text they enter is in fact a valid age. The mask attribute provides a power tool for constraining the type of input that is allowed. In this case, we've set the mask to "positiveinteger", which means that anything other than a positive integer will be considered invalid. However, we don't want to allow just any positive integer. If the respondent types "1" for example, we know that can't be correct because one year-olds don't typically respond to surveys. Similarly, a response of 230432 s invalid because people don't live that long. So, we'll use the range attribute to contrain the range of valid ages to a value from 7 to 110.

Next up is the respondent's ethnicity. Just as before, we'll use a dropdown, specifying a caption and the response choices:

<dropdown ethnicity>
/ caption = "Ethnicity"
/ options = ("Hispanic or Latino", "Not Hispanic or Latino", "Unknown")
</dropdown>

The next question asks for the respondent's race. This is another multiple choice question, but it's slightly different than the previous ones because we'll want to include an "other" option that allows the respondent to enter a response that doesn't appear in the list of options. The dropdown question doesn't support the "other" option, but the radiobuttons control does, so we'll use that:

<radiobuttons race>
/ caption = "Race"
/ options = (
    "American Indian/Alaska Native", 
    "East Asian", 
    "South Asian", 
    "Native Hawaian or other Pacific Islander", 
    "Black or African American", 
    "White", 
    "More than one race - Black/White")
/ other = "Other"
</radiobuttons>

The radiobuttons* element has caption and option attributes that serve the same purpose as they do with the dropdown element. However, we've specified another attribute called other that tells Inquisit to add an "Other" option to the response choices. That options will include a textbox in which respondents can type their race if it isn't in the list.

*Sidenote: You may be wondering why this control is called "radiobuttons". If you were born before 1970, you might recall that the car radios at the time often had a row of punch buttons for selecting a preset radio station. When you punched in one button, the previously selected button popped out, thus assuring that only one station could be selected at a time. The radiobuttons user interface control functions in a similar way, so the name caught on.

Next, we'll ask for participant's political identity. This, too, is a multiple choice question, so either the dropdown or radiobuttons controls would work just fine. However, since liberal is generally associated with "left" and conservative with "right", we'll use a slider control in order to leverages this common association. With a slider control, users respond by sliding a button along a track until it is in the desired position. The track can offer a near-continuous array of positions, or it can force the button into a fixed number of discrete locations. Positions along the track can be labeled to indicate their meaning. With our slider control, respondents will move the button leftward to indicate increasingly liberal values and rightward to indicate increasingly conservative values. Our slider item is defined as follows:

<slider political>
/ caption = "Political Identity"
/ labels = (
    "strongly~nliberal", "moderately~nliberal", "slightly~nliberal", 
    "neutral", "slightly~nconservative", "moderately~nconservative", 
    "strongly~nconservative")
/ range = (1, 7)
/ slidersize = (60%, 5%)
/ showtooltips = false
</slider>

The caption attribute has the same function as in the previous items. The labels attribute specifies the labels that appear in equal distances from left to right along the slider track. Note that labels include the characters "~n". This is not a typo, it is a special character sequence indicating that Inquisit should insert a line break in that position when displaying the label on the screen.

The range attribute defines the number of positions on the track. In this case, there are seven positions who's values range from 1 to 7. Since there also seven labels, each position will align with each of the labels. Next, we'll use to slidersize attribute define the width and height of the slider so that it is wide enough to accomodate all of the labels. We've set the width to be 60% of the width of the computer screen, which should give it plenty of room. Finally, we've set the showtooltips attribute to false, so that the control doesn't display the values of each position in a tooltip as the user moves the button along the slider.

For the respondent's occupation, we'll again use a dropdown control. The dropdown is particularly useful in this case because it allows us to display a large number of options in a small amount of screen space:

<dropdown occupation>
/ caption = "Occupation"
/ options = ("Administrative Support - Supervisors", "Administrative Support - Financial Clerks", 
 "Administrative Support - Information and Records", 
 "Administrative Support - Recording, Scheduling, Dispatching, Distributing", 
 "Administrative Support - Secretaries and Assistants", 
 "Administrative Support - Other Support (data entry, office clerk, proofreaders)", 
 "Arts/Design/Entertainment/Sports - Art and Design", "Arts/Design/Entertainment/Sports - Entertainers and Performers",
 "Arts/Design/Entertainment/Sports - Media and communication", "Arts/Design/Entertainment/Sports - Media Equipment workers", 
 "Business - Business Operations", "Business - Financial Specialists", "Computer/Math - Computer Specialists", 
 "Computer/Math - Math Scientists","Computer/Math - Math Technicians", "Construction/Extraction - Supervisors", 
 "Construction/Extraction - Construction Trades","Construction/Extraction - Helpers, Construction Trades", 
 "Construction/Extraction - Extraction (e.g., mining, oil)", "Construction/Extraction - Other", 
 "Education - Postsecondary Teachers", "Education - Primary, Secondary, and Special Ed Teachers",
 "Education - Other teachers and instructors", "Education - Librarians, Curators, Archivists", 
 "Education - Other education, training, and library occupations", "Education - Student", 
 "Engineers/Architects - Architects, Surveyors, Cartographers", "Engineers/Architects - Engineers",
 "Engineers/Architects - Drafters, Engineering and Mapping Technicians", "Farming, Fishing, Forestry - Supervisors", 
 "Farming, Fishing, Forestry - Agriculture","Farming, Fishing, Forestry - Fishing and Hunting", 
 "Farming, Fishing, Forestry - Forest, Conservation, Logging", "Farming, Fishing, Forestry - Other", 
 "Food Service - Supervisors", "Food Service - Cooks and food prep", "Food Service - Servers", 
 "Food Service - Other food service workers (e.g., dishwasher, host)", 
 "Healthcare - Diagnosing and Treating Practitioners (MD, Dentist, etc.)", 
 "Healthcare - Technologists and Technicians", "Healthcare - Nursing and Home Health Assistants", 
 "Healthcare - Occupational and Physical Therapist Assistants", "Healthcare - Other healthcare support", 
 "Homemaker or Parenting", "Legal - Lawyers, Judges, and related workers", "Legal - Legal support workers", 
 "Maintenance - Building and Grounds Supervisors", "Maintenance - Building workers","Maintenance - Grounds Maintenance", 
 "Management - Top Executives",  "Management - Advertising, Sales, PR, Marketing","Management - Operations Specialists", 
 "Management - Other Management Occupations", "Military - Officer and Tactical Leaders/Managers", 
 "Military - First-line enlisted supervisor/manager", "Military - enlisted tactical, air/weapons, crew, other", 
 "Production - Supervisors", "Production - Assemblers and Fabricators","Production - Food processing",
 "Production - Metal and Plastic", "Production - Printers", "Production - Textile, Apparel, Furnishings", 
 "Production - Woodworkers", "Production - Plant and System Operators", "Production - Other", 
 "Protective Service - Supervisors", "Protective Services - Fire fighting and prevention", 
 "Protective services - Law Enforcement", "Protective Services - Other (e.g., security, lifeguards, crossing guards)", 
 "Repair/Installation - Supervisors", "Repair/Installation - Electrical and Electronic",
 "Repair/Installation - Vehicle and Mobile Equipment", "Repair/Installation - Other", "Retired", 
 "Sales - Supervisors", "Sales - Retail","Sales - Sales Representatives and Services", 
 "Sales - Wholesale and Manufacturing", "Sales - Other sales (e.g., telemarketers, real estate)", 
 "Science - Life Scientists", "Science - Physical scientists","Science - Social Scientists", 
 "Science - Life, Physical, Social Science Technicians", "Service and Personal Care - Supervisors", 
 "Service and Personal Care - Animal Care","Service and Personal Care - Entertainment attendants", 
 "Service and Personal Care - Funeral Service", "Service and Personal Care - Personal Appearance", 
 "Service and Personal Care - Transportation, Tourism, Lodging", 
 "Service and Personal Care - Other service (e.g., child care, fitness)", 
 "Social Service - Counselors, Social Workers, Community specialists", 	"Social Service - Religious Workers", 
 "Transportation - Supervisors", "Transportation - Air Transportation","Transportation - Motor Vehicle Operators", 
 "Transportation - Rail Transport", "Transportation - Water Transport", "Transportation - Material Moving", 
 "Transportation - Other", "Unemployed")
/ optionvalues = (
 "43-1000", "43-3000", "43-4000", "43-5000", "43-6000", "43-9000", "27-1000", "27-2000", "27-3000", 
 "27-4000", "13-1000", "13-2000", "15-1000", "15-2000", "15-3000", "47-1000", "47-2000", "47-3000", 
 "47-5000", "47-4000", "25-1000", "25-2000", "25-3000", "25-4000", "25-9000", "25-9999", "17-1000", 
 "17-2000", "17-3000", "45-1000", "45-2000", "45-3000", "45-4000", "45-9000", "35-1000", "35-2000", 
 "35-3000", "35-9000", "29-1000", "29-2000", "31-1000", "31-2000", "31-9000", "00-0000", "23-1000", 
 "23-2000", "37-1000", "37-2000", "37-3000", "11-0000", "11-2000", "11-3000", "11-9000", "55-1000", 
 "55-2000", "55-3000", "51-1000", "51-2000", "51-3000", "51-4000", "51-5000", "51-6000", "51-7000", 
 "51-8000", "51-9000", "33-1000", "33-2000", "33-3000", "33-9000", "49-1000", "49-2000", "49-3000", 
 "49-9000", "99-0001", "41-1000", "41-2000", "41-3000", "41-4000", "41-9000", "19-1000", "19-2000", 
 "19-3000", "19-4000", "39-1000", "39-2000", "39-3000", "39-4000", "39-5000", "39-6000", "39-9000", 
 "21-1000", "21-2000", "53-1000", "53-2000", "53-3000", "53-4000", "53-5000", "53-7000", "53-6000", 
 "99-9999") 
</dropdown>

		

As you can see, there are a lot of choices in the list! You may have also noticed that we're using the optionvalues attribute. By default, Inquisit records the text of the selected option into the data file. The optionvalues attribute allows us to assign alternative values to each option to be used in recording the data. This is handy if you want to use numeric values or codes when analyzing the data rather than the sometimes long strings of text that are displayed for each response choice. In this case, each occupation will be recorded using the Standard Occupational Classification code as defined by the US Department of Labor.


Overview Creating Survey Questions (Continued)