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.

    • Related Articles

    • Question settings

      About question settings Question settings is the panel on the right that opens when you select a question. It has two views. Simple shows the settings most questions need. Advanced shows every setting of the question type, sorted into sections. Which ...
    • Conditions: show a question only when it applies

      About conditions A condition decides whether participants see a question. The question appears only when its condition is true, for example a follow-up question that only laptop users get. Otherwise it is skipped. You build conditions with the ...
    • Validation: make sure the answers you get are usable

      About validation Validation checks answers before participants can move on. It ranges from requiring an answer to rules you write yourself as an equation. Everything is set per question in Question settings. Require an answer Select the question and ...
    • Piping: use answers from previous questions

      About piping Piping puts an earlier answer into a later text, for example "What do you like most about your Laptop?" after a participant chose Laptop. You insert a placeholder with the question code in curly brackets, and LimeSurvey replaces it with ...
    • Add and edit a question

      About adding and editing questions Questions live in question groups. You add them with the purple + in the top bar and edit them in place in the editorial area, where they look the way participants will see them. The settings of the selected ...