Questionnaire design

Answer categories

Each answer category must be laid out on a single line. Remember that the final appearance for the survey participant, including line wrapping, is controlled by the browser. The syntax of the answer category line may be either of the following three:

    Simply a label
    *number*Label
    *number*behaviour_code*Label

A simple label is automatically assigned a numeric code one unit larger than the previous code, starting from 1. If a number is provided between asterisks, that number becomes the category code. Answer categories need not be ordered according to this number and numbers need not form a sequence.

Answer categories are always given numeric codes. By default, CallWeb reserves four digits to store all answers to regular questions (exclusive of open end parts, see Open end part section) but more can be used. If more are used, the "# Extraction width" pound instruction will be requested by the compiler.

One or more behaviour codes may be added between asterisks following the number code (a number code is required in order to use a behaviour code). Behaviour codes are selected from the following list:

Aalways displayed code; this code is always displayed in cwfreq,cgi even if the module is instructed to leave out categories with counts of zero.
Bblocked code; this code remains in its location in the context of permutations, inversions or alpha orders. A [B]locked code is an anchor. Codes before and after it are subject to permutation, inversion or alpha order; assuming that there are codes from 1 to 10 in a ROTATION question and that codes 1, 5 and 10 are [B]locked, then codes 2 to 4 and 6 to 9 are randomly ordered (within these two sequences) and codes 1, 5 and 10 are static in the first, fifth and tenth location.
Cno comma; commas will be stripped from the numeric open-end part associated with the question.
Ddefault category; this answer category is selected by default when the question is displayed.
Eevidence: this answer category is displayed as a title above the radio buttons/checkboxes as well as the regular label area; this answer is not selectable.
Fforced category; this answer category will be displayed no matter what the situation is (e.g., category display conditions, SUBSET questions).
Gproper case; the alphanumeric open-end part associated with the question will capitalize the initial letter as well as every letter following a delimiter (space, comma, dash, etc.).
Hhidden; the response category contains the text of the <label> framing the question text in accessibility mode.
Iinvisible; the response category is not displayed as part of the questionnaire.
Kkill the carriage return before the alphanumeric open-end box.
Lprefix; the response category label is prefixed with the text (and possibly HTML code) in "# LIRE" and it is formatted using the .NEPASLIRE style.
Min a matrix context only, the response category label is displayed within the matrix cell corresponding to this category; recalled values are recognized. Using M in conjunction with N allows the display of a category label alone in a cell; this category label could be made up of only a recalled response. By default, the banner cell above the first row of an M response category is empty; alternatively, CallWeb can fill the banner cell with the text found after a [COL] code in the response category label of the first matrix question (e.g.,
*1*M*[EN]???[COL]DK/NR[FR]???[COL]NSP/PDR
displays "???" within the table cells and the text "DK/NR" or "NSP/PDR" in the banner cell). This system works with drop-down lists if the [COL] text is in the first response category.
Nnon selectable category; this answer category is not available for selection but its label is displayed; this is useful to insert sub-titles in long category lists.
Ooptional open-end part; if this answer category possesses an open-end part, it could be selected without completing the open-end component.
Pprefix; the response category label is prefixed with the text (and possibly HTML code) in "# NE PAS LIRE" and it is formatted using the .NEPASLIRE style.
Sspecial code; in regular list format, the SPECIAL style is applied to the response label; in table format, in addition to this formatting, the column coloured with the "# M_SpecialColour" colour as if it were cited in the SPECIAL parameter of the TABLE statement.
Ttest the open-end; attached to a code which is related to a numeric open-end, T redisplays the page if the value entered is less than the planned minimum or more than the planned maximum; the value supplied on that second page is accepted no matter what.
Uuppercase; the alphanumeric open-end part associated with the question will turn all text to uppercase characters.
Vmissing value code; used by cqfreq in univariate distributions to indicate missing value codes.
Xexclusive category; this answer category must be selected alone if at all; this behaviour code makes sense only in the context of multiple response questions.
<places an open-end box on the left side of a table cell (default position); used on the first response code of a question, it does the same for a drop-down list. Outside of a table, it places a one-line box on the left side of the response label.
=centers an open-end box in a table cell; used on the first response code of a question, it does the same for a drop-down list.
>places an open-end box on the right side of a table cell; used on the first response code of a question, it does the same for a drop-down list. Outside of a table, it places a one-line box on the right side of the response label.
)places the text defined using the "M" behaviour code (above) right of the radio button or checkbox (the default is left). See also "# M text position".
(places the text defined using the "M" behaviour code (above) left of the radio button or checkbox (this is the the default position). See also "# M text position".
~deactivates the display of the calendar for a D open-end.

Language segments in answer categories are treated in the same manner as within the question text. A lonely equal sign (=) in a text field can be used to copy text from the default language to any non-default language.

Example of an answer category:

    *9*X*[EN]Don't know[FR]Ne sait pas

An unlimited number of categories may be defined for each question. Questionnaire compilation is obviously longer as the number of categories increases.

Copying of answer categories

It is possible to borrow integrally the answer categories from another question by inserting a single line in the answer category section. This line contains the symbol "=" and the name of the question from which to borrow such as in the following:

    =Q1

Borrowing questions and questions borrowed from need not be in any particular order in the questionnaire.

Response aliases

Response aliases are elements of text which are different from the main label of an answer and which can be recalled instead of the main label. The syntax of aliases is as follows:

    label[ALIAS PW:text][ALIAS NAME:text]

Language codes and behaviour codes can be used along with aliases as in the following example:

    *5*D*[EN]label[ALIAS FIRST:text][ALIAS SECOND:text][FR]étiquette[ALIAS FIRST:texte][ALIAS SECOND:texte]

In a given set of answer codes, some codes may bear aliases while others don't. A give code can possess an indefinite number of aliases. Aliases must be placed at the end of the response. Aliases are used in recalls using the syntax &QUESTION#alias_label (e.g., &Q1#PW).

"Title" attribute

Special tags can be added to each response category to improve accessibility for the visually impaired. These special tags are placed in the "title" attribute of HTML form objects to better identify them. These labels are defined in a pair of tags <title></title> in the definition of a response category like this:

    *5*D*[EN]label<title>The title goes here</title>[ALIAS FIRST:text][FR]étiquette<title>Le titre va ici</title>[ALIAS FIRST:texte]

The "title" attribute can be defined for all categories, some or none, in one language or several, as needed. The default is the response label itself.

Special cases: permutations and inversions

CallWeb features special tools to implement answer category permutation and inversion.

If the keyword "ROTATION" is present on the question name instruction, the answer categories are displayed in random order, suject to the categories with a B behaviour code.

If the keyword "INVERSION" is present on the question name instruction, the answer categories are displayed in the original order or the reversed order, randomly, suject to the categories with a B behaviour code.

Example:

    Q1 ROTATION
    % Question text
    [EN]Are you generally considered a male or a female?
    [FR]Êtes-vous généralement vu(e) comme un homme ou une femme?

Special case: display conditions on response categories

By default, all response categories are displayed. However, their display can be made conditional to previous answers by inserting an additional line containing a display condition within square brackets. Such a condition line affects the category that is defined on the line following immediately.

Example:

    A label
    [Q1.EQ.1]
    *2*Label
    *3*Label

In this example, the second category is displayed and available only if the value of Q1 is 1. Answer category display conditions are enforced even when questions are presented as tables.

Questionnaire design

Answer categories

Each answer category must be laid out on a single line. Remember that the final appearance for the survey participant, including line wrapping, is controlled by the browser. The syntax of the answer category line may be either of the following three:

    Simply a label
    *number*Label
    *number*behaviour_code*Label

A simple label is automatically assigned a numeric code one unit larger than the previous code, starting from 1. If a number is provided between asterisks, that number becomes the category code. Answer categories need not be ordered according to this number and numbers need not form a sequence.

Answer categories are always given numeric codes. By default, CallWeb reserves four digits to store all answers to regular questions (exclusive of open end parts, see Open end part section) but more can be used. If more are used, the "# Extraction width" pound instruction will be requested by the compiler.

One or more behaviour codes may be added between asterisks following the number code (a number code is required in order to use a behaviour code). Behaviour codes are selected from the following list:

Aalways displayed code; this code is always displayed in cwfreq,cgi even if the module is instructed to leave out categories with counts of zero.
Bblocked code; this code remains in its location in the context of permutations, inversions or alpha orders. A [B]locked code is an anchor. Codes before and after it are subject to permutation, inversion or alpha order; assuming that there are codes from 1 to 10 in a ROTATION question and that codes 1, 5 and 10 are [B]locked, then codes 2 to 4 and 6 to 9 are randomly ordered (within these two sequences) and codes 1, 5 and 10 are static in the first, fifth and tenth location.
Cno comma; commas will be stripped from the numeric open-end part associated with the question.
Ddefault category; this answer category is selected by default when the question is displayed.
Eevidence: this answer category is displayed as a title above the radio buttons/checkboxes as well as the regular label area; this answer is not selectable.
Fforced category; this answer category will be displayed no matter what the situation is (e.g., category display conditions, SUBSET questions).
Gproper case; the alphanumeric open-end part associated with the question will capitalize the initial letter as well as every letter following a delimiter (space, comma, dash, etc.).
Hhidden; the response category contains the text of the <label> framing the question text in accessibility mode.
Iinvisible; the response category is not displayed as part of the questionnaire.
Kkill the carriage return before the alphanumeric open-end box.
Lprefix; the response category label is prefixed with the text (and possibly HTML code) in "# LIRE" and it is formatted using the .NEPASLIRE style.
Min a matrix context only, the response category label is displayed within the matrix cell corresponding to this category; recalled values are recognized. Using M in conjunction with N allows the display of a category label alone in a cell; this category label could be made up of only a recalled response. By default, the banner cell above the first row of an M response category is empty; alternatively, CallWeb can fill the banner cell with the text found after a [COL] code in the response category label of the first matrix question (e.g.,
*1*M*[EN]???[COL]DK/NR[FR]???[COL]NSP/PDR
displays "???" within the table cells and the text "DK/NR" or "NSP/PDR" in the banner cell). This system works with drop-down lists if the [COL] text is in the first response category.
Nnon selectable category; this answer category is not available for selection but its label is displayed; this is useful to insert sub-titles in long category lists.
Ooptional open-end part; if this answer category possesses an open-end part, it could be selected without completing the open-end component.
Pprefix; the response category label is prefixed with the text (and possibly HTML code) in "# NE PAS LIRE" and it is formatted using the .NEPASLIRE style.
Sspecial code; in regular list format, the SPECIAL style is applied to the response label; in table format, in addition to this formatting, the column coloured with the "# M_SpecialColour" colour as if it were cited in the SPECIAL parameter of the TABLE statement.
Ttest the open-end; attached to a code which is related to a numeric open-end, T redisplays the page if the value entered is less than the planned minimum or more than the planned maximum; the value supplied on that second page is accepted no matter what.
Uuppercase; the alphanumeric open-end part associated with the question will turn all text to uppercase characters.
Vmissing value code; used by cqfreq in univariate distributions to indicate missing value codes.
Xexclusive category; this answer category must be selected alone if at all; this behaviour code makes sense only in the context of multiple response questions.
<places an open-end box on the left side of a table cell (default position); used on the first response code of a question, it does the same for a drop-down list. Outside of a table, it places a one-line box on the left side of the response label.
=centers an open-end box in a table cell; used on the first response code of a question, it does the same for a drop-down list.
>places an open-end box on the right side of a table cell; used on the first response code of a question, it does the same for a drop-down list. Outside of a table, it places a one-line box on the right side of the response label.
)places the text defined using the "M" behaviour code (above) right of the radio button or checkbox (the default is left). See also "# M text position".
(places the text defined using the "M" behaviour code (above) left of the radio button or checkbox (this is the the default position). See also "# M text position".
~deactivates the display of the calendar for a D open-end.

Language segments in answer categories are treated in the same manner as within the question text. A lonely equal sign (=) in a text field can be used to copy text from the default language to any non-default language.

Example of an answer category:

    *9*X*[EN]Don't know[FR]Ne sait pas

An unlimited number of categories may be defined for each question. Questionnaire compilation is obviously longer as the number of categories increases.

Copying of answer categories

It is possible to borrow integrally the answer categories from another question by inserting a single line in the answer category section. This line contains the symbol "=" and the name of the question from which to borrow such as in the following:

    =Q1

Borrowing questions and questions borrowed from need not be in any particular order in the questionnaire.

Response aliases

Response aliases are elements of text which are different from the main label of an answer and which can be recalled instead of the main label. The syntax of aliases is as follows:

    label[ALIAS PW:text][ALIAS NAME:text]

Language codes and behaviour codes can be used along with aliases as in the following example:

    *5*D*[EN]label[ALIAS FIRST:text][ALIAS SECOND:text][FR]étiquette[ALIAS FIRST:texte][ALIAS SECOND:texte]

In a given set of answer codes, some codes may bear aliases while others don't. A give code can possess an indefinite number of aliases. Aliases must be placed at the end of the response. Aliases are used in recalls using the syntax &QUESTION#alias_label (e.g., &Q1#PW).

"Title" attribute

Special tags can be added to each response category to improve accessibility for the visually impaired. These special tags are placed in the "title" attribute of HTML form objects to better identify them. These labels are defined in a pair of tags <title></title> in the definition of a response category like this:

    *5*D*[EN]label<title>The title goes here</title>[ALIAS FIRST:text][FR]étiquette<title>Le titre va ici</title>[ALIAS FIRST:texte]

The "title" attribute can be defined for all categories, some or none, in one language or several, as needed. The default is the response label itself.

Special cases: permutations and inversions

CallWeb features special tools to implement answer category permutation and inversion.

If the keyword "ROTATION" is present on the question name instruction, the answer categories are displayed in random order, suject to the categories with a B behaviour code.

If the keyword "INVERSION" is present on the question name instruction, the answer categories are displayed in the original order or the reversed order, randomly, suject to the categories with a B behaviour code.

Example:

    Q1 ROTATION
    % Question text
    [EN]Are you generally considered a male or a female?
    [FR]Êtes-vous généralement vu(e) comme un homme ou une femme?

Special case: display conditions on response categories

By default, all response categories are displayed. However, their display can be made conditional to previous answers by inserting an additional line containing a display condition within square brackets. Such a condition line affects the category that is defined on the line following immediately.

Example:

    A label
    [Q1.EQ.1]
    *2*Label
    *3*Label

In this example, the second category is displayed and available only if the value of Q1 is 1. Answer category display conditions are enforced even when questions are presented as tables.