Documentation Docs
Documentation Docs

settings

Global settings that apply to all surveys on the page. To specify one of the settings, use the code below:

import { settings } from "survey-core";

settings.settingName = "value";

This property is obsolete. Use the settings.designMode.showEmptyDescriptions property instead.

Type:
boolean writable
Implemented in:
settings

This property is obsolete. Use the settings.designMode.showEmptyTitles property instead.

Type:
boolean writable
Implemented in:
settings

This property is obsolete. Use the settings.triggers.changeNavigationButtonsOnComplete property instead.

Type:
boolean writable
Implemented in:
settings
commentSuffix property

A suffix added to the name of the property that stores comments.

Default value: "-Comment"

You can specify this setting for an individual survey: commentSuffix.

Type:
string writable
Implemented in:
settings
comparator property

An object that configures string comparison.

Nested properties:

  • trimStrings: Boolean
    Specifies whether to remove whitespace from both ends of a string before the comparison. Default value: true.

  • caseSensitive: Boolean
    Specifies whether to differentiate between capital and lower-case letters. Default value: false.

Type:
{ trimStrings: boolean; caseSensitive: boolean; normalizeTextCallback: (str: string, reason: string) => string; } writable
Implemented in:
settings

A property that allows you to display a custom confirm dialog in async mode or activate the standard browser dialog.

To display a custom confirm dialog, set this property to a function that renders it. This function should return true to be enabled; otherwise, a survey executes the confirmActionFunc function. Pass the dialog result as the callback parameter: true if a user confirms an action, false otherwise.

To activate the standard browser dialog, set the confirmActionAsync property to a function that returns false. With this configuration, a survey falls back to the confirmActionFunc function, which renders the standard browser dialog by default.

import { settings } from "survey-core";

// Display the standard browser dialog
settings.confirmActionAsync = () => {
   return false;
}
Type:
(message: string, callback: (res: boolean) => void) => boolean writable
Implemented in:
settings

A property that allows you to display a custom confirm dialog.

Set this property to a function that renders your custom dialog window. This function should return true if a user confirms an action or false otherwise.

Type:
(message: string) => boolean writable
Implemented in:
settings
customIcons property

An object that specifies icon replacements. Object keys are built-in icon names. To use a custom icon, assign its name to the key of the icon you want to replace:

import { settings } from "survey-core";

settings.customIcons["icon-redo"] = "custom-redo-icon";

For more information about icons in SurveyJS, refer to the following help topic: UI Icons.

Type:
{} writable
Implemented in:
settings

This property is obsolete. Use the settings.localization.defaultLocaleName property instead.

Type:
string writable
Implemented in:
settings
designMode property

An object that configures survey appearance when the survey is being designed in Survey Creator.

Nested properties:

  • showEmptyDescriptions: Boolean
    Specifies whether to display an empty description for pages and panels. Default value: true.

  • showEmptyTitles: Boolean
    Specifies whether to display an empty title for pages and panels. Default value: true.

Type:
{ showEmptyDescriptions: boolean; showEmptyTitles: boolean; } writable
Implemented in:
settings

This property is obsolete. Use the settings.web.disableQuestionWhileLoadingChoices property instead.

Type:
boolean writable
Implemented in:
settings
enterKeyAction property

Specifies an action to perform when users press the Enter key within a survey.

Possible values:

  • "moveToNextEditor" - Moves focus to the next editor.
  • "loseFocus" - Removes focus from the current editor.
  • "default" - Behaves as a standard <input> element.
Type:
"moveToNextEditor" | "loseFocus" | "default" writable
Implemented in:
settings

This property is obsolete. Use the settings.triggers.executeCompleteOnValueChanged property instead.

Type:
boolean writable
Implemented in:
settings

This property is obsolete. Use the settings.triggers.executeSkipOnValueChanged property instead.

Type:
boolean writable
Implemented in:
settings

This property is obsolete. Use the settings.serialization.itemValueSerializeAsObject property instead.

Type:
boolean writable
Implemented in:
settings

This property is obsolete. Use the settings.serialization.itemValueSerializeDisplayText property instead.

Type:
boolean writable
Implemented in:
settings

A separator used in a shorthand notation that specifies a value and display text for an ItemValue object: "value|text".

Default value: "|"

Type:
string writable
Implemented in:
settings
lazyRender property

An object that configures lazy rendering.

Nested properties:

  • enabled: Boolean
    Specifies whether to add questions to the DOM only when they get into the viewport. Default value: false.

Lazy rendering is an experimental feature that may not work as expected in all use cases.

Type:
{ enabled: boolean; firstBatchSize: number; } writable
Implemented in:
settings

This property is obsolete. Use the settings.lazyRender.enabled property instead.

Type:
boolean writable
Implemented in:
settings
localization property

An object that contains properties related to localization.

Nested properties:

  • useLocalTimeZone: Boolean
    Disable this property if you want internal SurveyJS functions to use methods that work with UTC date and time (setUTCDate() setUTCHours(), etc.) instead of methods that work with local date and time (setYear, setHours(), etc.). Default value: true.

  • defaultLocaleName: String
    A property key that stores a translation for the default locale. Default value: "default".

  • storeDuplicatedTranslations: Boolean
    Specifies whether surveys should store translation strings that equal the translation strings in the default locale. Default value: false.

Type:
{ useLocalTimeZone: boolean; storeDuplicatedTranslations: boolean; defaultLocaleName: string; } writable
Implemented in:
settings
matrix property

An object with properties that apply to Single-Choice, Multiple-Choice, and Dynamic Matrix questions.

Nested properties:

  • defaultRowName: String
    A property key that stores an object with default cell values. Default value: "default".

  • defaultCellType: String
    The default type of matrix cells. Default value: "dropdown".
    You can specify this setting for individual questions or matrix columns: cellType. Refer to the cellType property description for information on possible values.

  • totalsSuffix: String
    A suffix added to the name of the property that stores total values. The resulting property name consists of the matrix name and the suffix. Default value: "-total".

  • maxRowCount: Number
    A maximum number of rows in a Dynamic Matrix. Default value: 1000.
    You can specify this setting for an individual Dynamic Matrix: maxRowCount.

  • maxRowCountInCondition: Number
    A maximum number of matrix rows included in the Condition drop-down menu in Survey Creator. This menu is used to configure conditional survey logic. Default value: 1.
    If you set this property to 0, the Condition menu does not include any matrix rows. Users still can specify conditions that use matrix rows but only with Manual Entry.

  • renderRemoveAsIcon: Boolean
    Disable this property if you want to render the Remove action in Dynamic Matrix as a button. Otherwise, the action is rendered as an icon. Default value: true.

  • columnWidthsByType: Object
    An object that specifies fixed and minimum column width based on the column type.
    Example: settings.matrix.columnWidthsByType = { "tagbox": { minWidth: "240px", width: "300px" } }

  • rateSize: "small" (default) | "normal"
    Specifies the size of rate values. Applies to Rating Scale questions within matrixes.

Type:
{ defaultCellType: string; defaultRowName: string; totalsSuffix: string; maxRowCount: number; maxRowCountInCondition: number; renderRemoveAsIcon: boolean; columnWidthsByType: { [index: string]: { minWidth?: string; width?: string; }; }; rateSize: "small" | "normal"; } writable
Implemented in:
settings

This property is obsolete. Use the settings.matrix.defaultCellType property instead.

Type:
string writable
Implemented in:
settings

This property is obsolete. Use the settings.matrix.defaultRowName property instead.

Type:
string writable
Implemented in:
settings

This property is obsolete. Use the settings.matrix.maxRowCount property instead.

Type:
number writable
Implemented in:
settings

This property is obsolete. Use the settings.matrix.maxRowCountInCondition property instead.

Type:
number writable
Implemented in:
settings

This property is obsolete. Use the settings.matrix.renderRemoveAsIcon property instead.

Type:
boolean writable
Implemented in:
settings

This property is obsolete. Use the settings.matrix.totalsSuffix property instead.

Type:
string writable
Implemented in:
settings

Specifies how many times surveys can re-evaluate expressions when a question value changes. This limit helps avoid recursions in expressions.

Default value: 10

Type:
number writable
Implemented in:
settings
maxDate property

Specifies a maximum date that users can enter into a Text question with inputType set to "date" or "datetime-local". Set this property to a string with the folllowing format: "yyyy-mm-dd".

Type:
string writable
Implemented in:
settings
maxWidth property

A maximum width value for all survey elements.

Default value: "100%"

You can override this setting for individual elements: maxWidth.

Type:
string writable
Implemented in:
settings
minDate property

Specifies a minimum date that users can enter into a Text question with inputType set to "date" or "datetime-local". Set this property to a string with the folllowing format: "yyyy-mm-dd".

Type:
string writable
Implemented in:
settings
minWidth property

A minimum width value for all survey elements.

Default value: "300px"

You can override this setting for individual elements: minWidth.

Type:
string writable
Implemented in:
settings
noneItemValue property

A value to save in survey results when respondents select the None choice item.

Default value: "none"

Type:
string writable
Implemented in:
settings
notifications property

An object that configures notifications.

Nested properties:

  • lifetime: Number
    Specifies a time period during which a notification is displayed; measured in milliseconds.
Type:
{ lifetime: number; } writable
Implemented in:
settings
numbering property

An object with properties that configure question numbering.

Nested properties:

  • includeQuestionsWithHiddenNumber: Boolean
    Specifies whether to number questions whose hideNumber property is enabled. Default value: false.

  • includeQuestionsWithHiddenTitle: Boolean
    Specifies whether to number questions whose titleLocation property is set to "hidden". Default value: false.

Type:
{ includeQuestionsWithHiddenNumber: boolean; includeQuestionsWithHiddenTitle: boolean; } writable
Implemented in:
settings
panel property

An object with properties that apply to Dynamic Panel questions.

Nested properties:

  • maxPanelCount: Number
    A maximum number of panels in Dynamic Panel. Default value: 100.
    You can specify this setting for an individual Dynamic Panel: maxPanelCount.

  • maxPanelCountInCondition: Number
    A maximum number of Dynamic Panel panels included in the Condition drop-down menu in Survey Creator. This menu is used to configure conditional survey logic. Default value: 1.
    If you set this property to 0, the Condition menu does not include any panel questions. Users still can specify conditions that use panel questions but only with Manual Entry.

Type:
{ maxPanelCount: number; maxPanelCountInCondition: number; } writable
Implemented in:
settings

This property is obsolete. Use the settings.panel.maxPanelCountInCondition property instead.

Type:
number writable
Implemented in:
settings

This property is obsolete. Use the settings.panel.maxPanelCount property instead.

Type:
number writable
Implemented in:
settings

Specifies which part of a choice item responds to a drag gesture in Ranking questions.

Possible values:

  • "entireItem" (default) - Users can use the entire choice item as a drag handle.
  • "icon" - Users can only use the choice item icon as a drag handle.
Type:
string writable
Implemented in:
settings

A maximum number of rate values in a Rating question.

Default value: 20

Type:
number writable
Implemented in:
settings
readOnly property

An object with properties that configure questions in read-only mode.

Nested properties:

  • commentRenderMode: "textarea" (default) | "div"
    Specifies how to render the input field of Comment questions in read-only mode: as a disabled <textarea> element or as a <div> element with a non-editable question value within it.

  • textRenderMode: "input" (default) | "div"
    Specifies how to render the input field of Text questions in read-only mode: as a disabled <input> element or as a <div> element with a non-editable question value within it.

Type:
{ enableValidation: boolean; commentRenderMode: string; textRenderMode: string; } writable
Implemented in:
settings

This property is obsolete. Use the settings.readOnly.commentRenderMode property instead.

Type:
string writable
Implemented in:
settings

This property is obsolete. Use the settings.readOnly.textRenderMode property instead.

Type:
string writable
Implemented in:
settings
serialization property

An object that contains properties related to JSON serialization.

Nested properties:

  • itemValueSerializeAsObject: Boolean
    Enable this property if you want to serialize ItemValue instances as objects even when they include only the value property. Default value: false. View an example below.

  • itemValueSerializeDisplayText: Boolean
    Enable this property if you want to serialize the text property of ItemValue objects even when it is empty or equal to the value property. Default value: false. View an example below.

  • localizableStringSerializeAsObject: Boolean
    Enable this property if you want to serialize LocalizableString instances as objects even when they include only a translation string for the default locale. For example, "Custom String" will be serialized as { default: "Custom String" }. Default value: false.

import { ItemValue, settings } from "survey-core";

// `itemValueSerializeAsObject` example
settings.localization.itemValueSerializeAsObject = true;
const item = new ItemValue(5);
const itemString = item.toJSON(); // Produces { value: 5 } instead of 5

// `itemValueSerializeDisplayText` example
settings.localization.itemValueSerializeDisplayText = true;
const item = new ItemValue("item1");
const itemString = item.toJSON(); // Produces { value: "item1", text: "item1" } instead of "item1"
Type:
{ itemValueSerializeAsObject: boolean; itemValueSerializeDisplayText: boolean; localizableStringSerializeAsObject: boolean; } writable
Implemented in:
settings

This property is obsolete. Use the settings.serialization.localizableStringSerializeAsObject property instead.

Type:
boolean writable
Implemented in:
settings

This property is obsolete. Use the settings.numbering.includeQuestionsWithHiddenNumber property instead.

Type:
boolean writable
Implemented in:
settings

This property is obsolete. Use the settings.numbering.includeQuestionsWithHiddenTitle property instead.

Type:
boolean writable
Implemented in:
settings
showItemsInOrder property

Specifies the direction in which to lay out Checkbox and Radiogroup items. This setting affects the resulting UI when items are arranged in more than one column.

Possible values:

  • "row" (default) - Items fill the current row, then move on to the next row.
  • "column" - Items fill the current column, then move on to the next column.
Type:
string writable
Implemented in:
settings

Allows you to hide the maximum length indicator in text input questions.

If you specify a question's maxLength property or a survey's maxTextLength property, text input questions indicate the number of entered characters and the character limit. Assign false to the settings.showMaxLengthIndicator property if you want to hide this indicator.

Default value: true

Type:
boolean writable
Implemented in:
settings

This property is obsolete. Use the settings.localization.storeDuplicatedTranslations property instead.

Type:
boolean writable
Implemented in:
settings

A list of supported validators by question type.

Type:
{ question: string[]; comment: string[]; text: string[]; checkbox: string[]; imagepicker: string[]; } writable
Implemented in:
settings
surveyServiceUrl property

This property is obsolete. Use the settings.web.surveyServiceUrl property instead.

Type:
string writable
Implemented in:
settings

Specifies whether to close the drop-down menu of a TagBox question after a user selects a value.

This setting applies to all TagBox questions on a page. You can use the closeOnSelect property to specify the same setting for an individual TagBox question.

Type:
boolean writable
Implemented in:
settings
titleTags property

An object that specifies heading levels (<h1>, <h2>, etc.) to use when rendering survey, page, panel, and question titles.

Default value: { survey: "h3", page: "h4", panel: "h4", question: "h5" }

If you want to modify heading levels for individual titles, handle SurveyModel's onGetTitleTagName event.

Type:
{ survey: string; page: string; panel: string; question: string; } writable
Implemented in:
settings
triggers property

An object that contains properties related to triggers.

Nested properties:

  • changeNavigationButtonsOnComplete: Boolean
    Specifies whether to re-evaluate an expression associated with the Complete trigger immediately when a question value changes. If the expression evaluates to true, the trigger is executed. Default value: false.
    Keep this property set to false if you want to re-evaluate the Complete trigger's expression only when the respondents navigate to another page.

  • executeCompleteOnValueChanged: Boolean
    Specifies whether to replace the Next button with the Complete button when the Complete trigger is going to be executed. Default value: true.

  • executeSkipOnValueChanged: Boolean
    Specifies whether to re-evaluate an expression associated with the Skip trigger immediately when a question value changes. If the expression evaluates to true, the trigger is executed. Default value: true.
    Disable this property if you want to re-evaluate the Skip trigger's expression only when respondents navigate to another page.

Type:
{ changeNavigationButtonsOnComplete: boolean; executeCompleteOnValueChanged: boolean; executeSkipOnValueChanged: boolean; } writable
Implemented in:
settings

This property is obsolete. Use the settings.web.cacheLoadedChoices property instead.

Type:
boolean writable
Implemented in:
settings
useLocalTimeZone property

This property is obsolete. Use the settings.localization.useLocalTimeZone property instead.

Type:
boolean writable
Implemented in:
settings
web property

An object with properties that configure surveys when they work with a web service.

Nested properties:

  • encodeUrlParams: Boolean
    Specifies whether to encode URL parameters when you access a web service. Default value: true.

  • cacheLoadedChoices: Boolean
    Specifies whether to cache choices loaded from a web service. Default value: true.

  • disableQuestionWhileLoadingChoices: Boolean
    Disables a question while its choices are being loaded from a web service. Default value: false.

  • surveyServiceUrl: String
    The URL of the SurveyJS Service API endpoint.

Type:
{ encodeUrlParams: boolean; cacheLoadedChoices: boolean; disableQuestionWhileLoadingChoices: boolean; surveyServiceUrl: string; } writable
Implemented in:
settings

This property is obsolete. Use the settings.web.encodeUrlParams property instead.

Type:
boolean writable
Implemented in:
settings

Copyright © 2023 Devsoft Baltic OÜ. All rights reserved.

Why we use cookies.

This site uses cookies to make your browsing experience more convenient and personal. Cookies store useful information on your computer to help us improve the efficiency and relevance of our site for you. In some cases, they are essential to making the site work properly. By accessing this site, you consent to the use of cookies.

For more information, refer to DevSoft Baltic’ Terms of Use & Privacy Statement.

Your renewal subscription expires soon.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.

Your renewal subscription has expired.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.