Question and answer codes | LimeSurvey

Question and answer codes

About question and answer codes

Every question has a question code, such as Q001, and every answer option has an answer code, such as A001. Participants never see them. You use them: they identify questions and answers in exports, conditions, validation equations and piping. Short, meaningful codes such as device or satisfaction make all of these easier to read.

Show the codes

  1. Click ... at the top right of the editor.
  2. Under View, click Question codes. A check mark shows the view is on.

The codes appear next to each question in the Structure panel (1) and in front of the answer options of the selected question (2). Click Question codes again to hide them.

Codes shown in the editor, numbered 1 to 3, question codes in the Structure panel, answer codes next to the answer options and the Question code field

Change a question code

Select the question and type the new code into Question code at the top of Question settings (3).

Change an answer code

Turn on Question codes, select the question and type into the code box in front of the answer option (2).

Rules for codes

  • A question code is unique in the survey.
  • Start codes with a letter and use letters and numbers only: q1, not 1.
  • Codes are case-sensitive in conditions, validation equations and placeholders: Q001 and q001 are not the same.
  • A copied question gets a new code, such as Q798303. Rename it right away.

Tip: Settle your codes before you activate the survey. While a survey is active, codes are locked with the rest of its structure, and they are what your exports and analyses use to name the questions.

Note: If you rename a code that a condition, a validation equation or a placeholder uses, check that expression afterwards.

Next steps

FAQ

Where do I see the code of a question?

At the top of Question settings when the question is selected, or for all questions at once in the Structure panel after you turn on ... > View > Question codes.

Do participants see the codes?

No. Codes are for you. Participants see the question text and the answer texts.