Responses to questions in grids
Grids can contain subquestions with categorical, numeric, or text answers. However, the HTML code that renders the grid is generally the same for all types of subquestion, apart from the code that draws the radio button, checkbox, or input box in each cell.
Categorical subquestions
The HTML code for a categorical subquestion is as follows:
<tr>
<td></td>
<td class="mrGridQuestionText" style="text-Align:
Center;vertical-align: Middle;">
<span class="mrQuestionText" style="">column_text</span>
</td>
Other column headings</tr>
<tr>
<td class="mrGridCategoryText" style="text-Align:
Left;vertical-align: Middle;">
<span class="mrQuestionText" style="">row_text</span>
</td>
<td style="text-Align: Center;vertical-align: Middle;">
<div></div>
<input type="selection_type" name="cell_id" class="answer_type"
style="" value="ColHead1"></input>
</td>
Other cells in row 1
</tr>
Specifications for other rows
where:
▪column_text is the column heading text. There will be one <td> tag for each column.
▪row_text is the row heading text. There will be one <tr> tag for each row.
▪selection_type is radio for single-choice responses or checkbox for multiple-choice responses.
▪cell_id is the unique name for the current grid cell. UNICOM Intelligence Interviewer - Server creates this as _Qloopname_Qloopcat_Qquestionname_Ccategoryname, where loopname is the name of the main loop (grid) question, loopcat is the current item in the loop control list (the current column), questionname is the name of the repeated question, and categoryname is the name of the current category in that question's response list (the current row text). The following example makes this naming convention clearer.
▪answer_type is mrSingle for single-choice responses or mrMultiple for multiple-choice responses.
Example
For example, if the question is:
WhereFrom "Which country or countries produce ...?" loop
{
Gunpowder, Oolong, Puerh, Rooibos
} fields
(
Country "" categorical [1..]
{
China, India, Japan, Kenya,
CountryDK "Don't know"
};
) expand grid;
the first two column headings (China and India) and response rows (Gunpowder and Oolong) become:
<span class="mrQuestionText" style="">Which country or countries produce ...?</span>
<div><br/></div>
<div></div>
<span style="display: inline-block;">
<table summary="Which country or countries produce ...?" class="mrQuestionTable" style="">
<tr>
<td></td>
<td class="mrGridQuestionText" style="text-Align: Center;vertical-align: Middle;">
<span class="mrQuestionText" style="">China</span>
</td>
<td class="mrGridQuestionText" style="text-Align: Center;vertical-align: Middle;">
<span class="mrQuestionText" style="">India</span>
</td>
...
>/tr>
<tr>
<td class="mrGridCategoryText" style="text-Align: Left;vertical-align: Middle;">
<span class="mrQuestionText" style="">Gunpowder</span>
</td>
<td style="text-Align: Center;vertical-align: Middle;">
<div></div>
<input type="checkbox" name="_QWhereFrom_QGunpowder_QCountry_CChina" class="mrMultiple" style="" value="China"></input>
</td>
<td style="text-Align: Center;vertical-align: Middle;">
<div></div>
<input type="checkbox" name="_QWhereFrom_QGunpowder_QCountry_CIndia" class="mrMultiple" style="" value="India"></input>
</td>
...
</tr>
<tr>
<td class="mrGridCategoryText" style="text-Align: Left;vertical-align: Middle;">
<span class="mrQuestionText" style="">Gunpowder</span>
</td>
<td style="text-Align: Center;vertical-align: Middle;">
<div></div>
<input type="checkbox" name="_QWhereFrom_QOOlong_QCountry_CChina" class="mrMultiple" style="" value="China"></input>
</td>
<td style="text-Align: Center;vertical-align: Middle;">
<div></div>
<input type="checkbox" name="_QWhereFrom_QOOlong_QCountry_CIndia" class="mrMultiple" style="" value="India"></input>
</td>
...
</tr>
...
</table>
</span>
After a snapback or restart, any answers that were chosen in the original portion of the interview will have the
checked="" attribute in their definition so that the appropriate radio button or check box is preselected when the question is displayed. For more information, see
Categorical responses.
See also