Default Values

Setting default values for survey questions using the

A default value supplies an initial answer when a form starts. It is evaluated once — when the form is opened — and does not change when referenced answers are updated later. If you need a value that re-computes when other answers change, use Auto-Populate / Calculations instead.

Default values use a different reference grammar from calculations:

Default ValueCalculation
Reference style#question_name${question_name}
Example#country#res_num${quantity} * ${price}
Functionsnot supportedsupported

This page covers the default-value grammar. See Auto-Populate and Calculations for the calculation grammar.


Where to configure it

  1. Open your survey in the Survey Designer.
  2. Select a question of type text, integer, decimal, date, time, or datetime.
  3. In the right-hand Properties panel, scroll to the Advanced section.
  4. Click Default Value.

The Default Value dialog has two tabs:

  • Value Builder — build the value visually with four modes (Concatenate, Date/Time, System, Static).
  • Raw Expression — type the expression directly.

Default value sources

Static value

Type plain text or a number to use it as-is:

ExpressionResult
4242
Pre-filled textPre-filled text
N/AN/A

Example: a country field that defaults to a fixed value:

India

Today's date

The keyword today fills today's date in yyyy-MM-dd format (e.g. 2026-08-14).

today

Current timestamp

The keyword now fills the current date and time in ISO 8601 format (e.g. 2026-08-14T14:30:00.000Z).

now

today and now are whole-string keywords — the entire default must be exactly today or now (case-insensitive). You cannot combine them with other text.

For time-sensitive surveys, combine today with the question's Read Only setting so respondents cannot change the recorded date.

Copy another question's answer

Reference another question by name with #:

ExpressionWhat it doesExample result
#countryCopy the answer of question countryIndia
#fname #lnameFirst name, space, last nameJohn Doe
hello #country worldLiteral text mixed with a referencehello India world

In the Concatenate builder mode, click questions in the Available Questions list to add them as references. Each reference appears as a tag you can reorder or remove. To add a space between references, add the space as a literal separator.

A referenced question that has not been answered yet (or appears later in the form) resolves to an empty value at form start. The builder warns you when a reference points to a question that appears after the current one.

System variables

These auto-fill information about the current user or device:

VariableWhat it fills
#usernameThe current user's display name
#emailThe current user's email address
#deviceidThe device's unique identifier

Example — a "Recorded by" field:

#username

System variables are case-insensitive. If a value is unavailable (for example in offline mode), it resolves to an empty string instead of causing an error. They are useful for audit trails and "Recorded by" fields.

Combine values (concatenation)

You can mix literal text and references freely. A composite household identifier generated from State + District + Household Number:

#state#district#household_num

producing e.g. MH-PUNE-0012, or with separators:

#state-#district-#household_num

There are no function calls in the default-value grammar — concat(...) does not work here. Use concatenation as shown, or switch to an Auto-Populate/Calculation for function-based composition.


The Raw Expression syntax guide

PatternMeaning
#varnameReference another question's value
#username, #email, #deviceidSystem variables
todayToday's date (yyyy-MM-dd), whole string only
nowCurrent datetime (ISO 8601), whole string only
any other textStatic literal, displayed as-is

The editor validates your expression when you save. A reference that matches neither a question name nor a system variable blocks the save with an error.


Setting Default Values in XLSForm

Use the default column in the survey worksheet:

typenamelabeldefault
textpsu_idPSU Identifier#country#res_num#psu_resnum
textrecorded_byRecorded By#username
datevisit_dateVisit Datetoday
textstatusStatusPending

When you import the XLSForm, all default values are preserved and visible in the designer's Default Value editor.

Additional values for choice questions

For select_one and select_multiple questions, the additional_values column defines extra accepted values beyond the defined choices:

typenamelabeladditional_values
select_onesatisfactionSatisfaction Level98, 9997, 9998

This is used for survey-standard codes like 98 (Don't know) or 9997 (Refused) without modifying the original choice list. Values are deduplicated at runtime — if a value already exists in the choice list, it is not added again. You can manage additional values in the designer by expanding the Additional Values section in the Extended Properties panel.

additional_values is a separate column from default. It controls which answers are accepted, not what is pre-filled.


Default vs Auto-Populate

Default ValueAuto-Populate (calculation)
When evaluatedOnce at form startEvery time dependencies change
ReactiveNo — static after form startYes
Reference syntax#question_name${question_name}
FunctionsNoYes
Best forInitial static valuesDynamic computed values

If a field needs to update when other answers change, use Auto-Populate / Calculations instead of a default value.