A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model below:

API Reference: Dynamic Matrix Table

Creates and adds a new row to the matrix.

Type:
(setFocus?: boolean) => void
Parameters:
setFocus, type: boolean ,

(Optional) Pass true to focus the cell in the first column.

Implemented in:
QuestionMatrixDynamicModel

Specifies the location of the Add Row button.

Possible values:

Default value: "top" if transposeData is true; "bottom" if transposeData is false or the matrix is in compact mode.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
default
Accepted values:
default , top , bottom , topBottom
Implemented in:
QuestionMatrixDynamicModel
See also:
addRowText

A caption for the Add Row button.

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixDynamicModel
See also:
addRowButtonLocation

Specifies whether users are allowed to add new rows.

Default value: true

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
True
Implemented in:
QuestionMatrixDynamicModel
See also:
canAddRow * , allowRemoveRows

Specifies whether users are allowed to delete rows.

Default value: true

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
True
Implemented in:
QuestionMatrixDynamicModel
See also:
canRemoveRows * , allowAddRows

Specifies whether users can drag and drop matrix rows to reorder them. Applies only if transposeData is false.

Default value: false

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixDynamicModel

Specifies whether to apply shading to alternate matrix rows.

Single-Select Matrix Demo

Type:
boolean readonly

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixBaseModel

Specifies the error message position relative to matrix cells.

Possible values:

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
default
Accepted values:
default , top , bottom
Implemented in:
QuestionMatrixDropdownModelBase
See also:
detailErrorLocation

Gets or sets choice items for Dropdown, Checkbox, and Radiogroup matrix cells. You can override this property for individual columns.

This property accepts an array of objects with the following structure:

{
  "value": any, // A value to be saved in survey results
  "text": string, // A display text. This property supports Markdown. When `text` is undefined, `value` is used.
  "customProperty": any // Any property that you find useful.
}

To enable Markdown support for the text property, implement Markdown-to-HTML conversion in the onTextMarkdown event handler. For an example, refer to the following demo: Convert Markdown to HTML with markdown-it.

If you add custom properties, refer to the following help topic to learn how to serialize them into JSON: Add Custom Properties to Property Grid.

If you need to specify only the value property, you can set the choices property to an array of primitive values, for example, [ "item1", "item2", "item3" ]. These values are both saved in survey results and used as display text.

Type:
any[] writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
[]
Implemented in:
QuestionMatrixDropdownModelBase
See also:
cellType

Empties the errors array.

Type:
() => void
Implemented in:
Question
See also:
errors

Specifies when to clear the question value if the question becomes invisible.

Possible values:

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
default
Accepted values:
default , none , onComplete , onHidden , onHiddenContainer
Implemented in:
Question
See also:
SurveyModel.clearInvisibleValues * , visible * , SurveyModel.onComplete

Removes values that cannot be assigned to this question, for example, choices unlisted in the choices array.

Call this method after you assign new question values in code to ensure that they are acceptable.

This method does not remove values that fail validation. Call the validate() method to validate newly assigned values.

Type:
() => void
Implemented in:
Question
See also:
validate

Sets the question's value and comment properties to undefined.

Type:
(keepComment?: boolean) => void
Parameters:

keepComment, type: boolean

Implemented in:
Question
See also:
value * , comment

Creates a new object that has the same type and properties as the current SurveyJS object.

Type:
() => Base
Implemented in:
Base

Specifies how many columns this survey element spans in the grid layout. Applies only if you set the SurveyModel's gridLayoutEnabled property to true and define the gridLayoutColumns array for the parent page or panel.

Default value: 1

Type:
number writable
Implemented in:
SurveyElement

Specifies the number of columns in Radiogroup and Checkbox cells.

Default value: 0 (the number of columns is selected automatically based on the available column width)

Type:
number writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Accepted values:
0 , 1 , 2 , 3 , 4
Implemented in:
QuestionMatrixDropdownModelBase
See also:
cellType
Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Accepted values:
horizontal , vertical
Implemented in:
QuestionMatrixDropdownModelBase

An array of matrix columns.

For a Single-Select Matrix, the columns array can contain configuration objects with the text (display value) and value (value to be saved in survey results) properties. Alternatively, the array can contain primitive values that will be used as both the display values and values to be saved in survey results.

Single-Select Matrix Demo

For a Multi-Select Matrix or Dynamic Matrix, the columns array should contain configuration objects with properties described in the MatrixDropdownColumn API Reference section.

Multi-Select Matrix Demo

Type:
any[] writable
Implemented in:
QuestionMatrixBaseModel

A Boolean expression that is evaluated against each matrix column. If the expression evaluates to false, the column becomes hidden.

A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.

Use the {item} placeholder to reference the current column in the expression.

Refer to the following help topic for more information: Conditional Visibility.

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixBaseModel
See also:
rowsVisibleIf

Specifies whether to display a confirmation dialog when a respondent wants to delete a row.

Default value: false

View Demo

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixDynamicModel
See also:
confirmDeleteText

A message displayed in a confirmation dialog that appears when a respondent wants to delete a row.

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixDynamicModel
See also:
confirmDelete

Returns true if the survey element or its child elements have validation errors.

This property contains the result of the most recent validation. This result may be outdated. Call the validate method to get an up-to-date value.

Type:
boolean readonly
Implemented in:
SurveyElement
See also:
errors

Specifies whether default values for a new row/column should be copied from the last row/column.

If you also specify defaultValue, it will be merged with the copied values.

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixDynamicModel
See also:
defaultValue

A value to show in HTML questions and in the dynamic titles and descriptions of survey elements when the question value is empty.

Default value: ""

Dynamic Texts

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
Question

If it is not empty, then this value is set to every new row, including rows created initially, unless the defaultValue is not empty

Type:
any writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixDynamicModel
See also:
defaultValue * , copyDefaultValueFromLastEntry

A default value for the question. Ignored for question types that cannot have a value (for example, HTML).

The default value is used as a question value in the following cases:

View Demo

Type:
any writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
Question
See also:
defaultValueExpression

An expression used to calculate the defaultValue.

This expression applies until the question value is specified by an end user or programmatically.

An expression can reference other questions as follows:

An expression can also include built-in and custom functions for advanced calculations. For example, if the defaultValue should be today's date, set the defaultValueExpression to "today()", and the corresponding built-in function will be executed each time the survey is loaded. Refer to the following help topic for more information: Built-In Functions.

View Demo

Type:
any writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
Question
See also:
defaultValue * , setValueExpression

Specifies where to display a question description.

Possible values:

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
default
Accepted values:
default , underInput , underTitle
Implemented in:
Question
See also:
description * , hasDescription

An array of survey elements (questions and panels) to be displayed in detail sections.

Detail sections are expandable panels displayed under each matrix row. You can use them to display questions that do not fit into the row.

Set the detailPanelMode property to "underRow" or "underRowSingle" to display detail sections.

View Demo

Type:
IElement[] readonly

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixDropdownModelBase
See also:
detailPanel

Specifies the error message position for questions within detail sections.

Possible values:

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
default
Accepted values:
default , top , bottom
Implemented in:
QuestionMatrixDropdownModelBase
See also:
cellErrorLocation

Specifies the location of detail sections.

Possible values:

Use the detailElements property to specify content of detail sections.

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
none
Accepted values:
none , underRow , underRowSingle
Implemented in:
QuestionMatrixDropdownModelBase
See also:
detailPanel

Specifies whether to expand the detail section immediately when a respondent adds a new row.

View Demo

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixDynamicModel
See also:
detailPanelMode

Specifies how to arrange matrix questions.

Possible values:

Type:
"auto" | "list" | "table" readonly

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
auto
Accepted values:
auto , table , list
Implemented in:
QuestionMatrixBaseModel
Type:
string writable
Implemented in:
QuestionMatrixDynamicModel

A Boolean expression. If it evaluates to false, this question becomes read-only.

A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.

Refer to the following help topic for more information: Conditional Visibility.

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
Question
See also:
readOnly * , isReadOnly

Specifies the error message position. Overrides the questionErrorLocation property specified for the question's container (survey, page, or panel).

Possible values:

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
default
Accepted values:
default , top , bottom
Implemented in:
Question

Validation errors. Call the validate() method to validate survey element data.

Type:
SurveyError[] writable
Implemented in:
SurveyElement
See also:
validate

Moves focus to the input field of this question.

Type:
(onError?: boolean, scrollIfVisible?: boolean) => void
Parameters:
onError, type: boolean ,

Pass true if you want to focus an input field with the first validation error. Default value: false (focuses the first input field). Applies to question types with multiple input fields.

scrollIfVisible, type: boolean

Implemented in:
Question

Assigns a new JSON schema to the current survey element.

The JSON schema should contain only serializable properties of this survey element. Event handlers and properties that do not belong to the survey element are ignored.

Type:
(json: any, options?: ILoadFromJSONOptions) => void
Parameters:
json, type: any ,

A JSON schema that you want to apply to the current survey element.

options, type: ILoadFromJSONOptions ,

An object with configuration options.

options.validatePropertyValues, type: boolean ,

Pass true if you want to validate property values. Use the jsonErrors array to access validation errors.

Implemented in:
Base
See also:
toJSON

Returns a matrix column with a given name or null if a column with this is not found.

Type:
(columnName: string) => MatrixDropdownColumn
Parameters:
columnName, type: string ,

A column name.

Implemented in:
QuestionMatrixDropdownModelBase

Returns a display text that corresponds to the question value. For example, if you call this method for a Dropdown question, it returns an item text instead of an item value.

Type:
(keysAsText: boolean, value?: any) => any
Parameters:
keysAsText, type: boolean ,

Applies when the question value is an object (in Matrix, Multiple Text, and similar questions). Pass true if not only values in the object should be display texts, but also keys. Default value: false.

value, type: any ,

Specify this parameter to get a display text for a specific value, not for the current question value. If the question value is an object, this parameter should be a similar object.

Implemented in:
Question

Returns the survey's locale.

If a default locale is used, this method returns an empty string. To get the applied locale in this case, use the following code:

import { surveyLocalization } from 'survey-core';
const defaultLocale = surveyLocalization.defaultLocale;
Type:
() => string
Implemented in:
SurveyElement
See also:
Localization & Globalization

Returns an array of questions nested within the current question. Use this method to obtain questions within Multiple Text, Dynamic Panel, and Matrix-like questions.

Type:
(visibleOnly?: boolean, includeNested?: boolean, includeItSelf?: boolean) => Question[]
Parameters:
visibleOnly, type: boolean ,

A Boolean value that specifies whether to include only visible nested questions.

includeNested, type: boolean

includeItSelf, type: boolean

Return Value:

An array of nested questions.

Implemented in:
Question

Returns the question value as an object in which the question name, title, value, and other parameters are stored as individual properties.

If the question can have more than one value (Matrix, Multiple Text), the object enables the isNode flag and stores information about these values in the data property. Refer to the following help topic for more information: Access Full Survey Results.

Pass an object with the includeEmpty property set to false if you want to skip empty answers.

Type:
(options?: IPlainDataOptions) => IQuestionPlainData
Parameters:

options, type: IPlainDataOptions

Implemented in:
Question

Returns a JsonObjectProperty object with metadata about a serializable property that belongs to the current SurveyJS object.

If the property is not found, this method returns null.

Type:
(propName: string) => JsonObjectProperty
Parameters:
propName, type: string ,

A property name.

Implemented in:
Base

Returns the value of a property with a specified name.

If the property is not found or does not have a value, this method returns either undefined, defaultValue specified in the property configuration, or a value passed as the defaultValue parameter.

Type:
(name: string, defaultValue?: any, calcFunc?: () => any) => any
Parameters:
name, type: string ,

A property name.

defaultValue, type: any ,

(Optional) A value to return if the property is not found or does not have a value.

calcFunc, type: () => any

Implemented in:
Base

Returns an object with row values. If a row has no answers, this method returns an empty object.

Type:
(rowIndex: number) => any
Parameters:
rowIndex, type: number ,

A zero-based row index.

Implemented in:
QuestionMatrixDropdownModelBase
See also:
setRowValue

Returns title location calculated based on the question's titleLocation property and the questionTitleLocation property of the question's containers (survey, page, or panel).

Type:
() => string
Implemented in:
Question
See also:
titleLocation * , SurveyModel.questionTitleLocation

Returns false if the question has no input fields (HTML, Image, and similar question types).

Type:
boolean readonly
Implemented in:
Question
See also:
hasSingleInput

Returns false if the titleLocation property is set to "hidden" or if the question cannot have a title (for example, an HTML question).

If the title property is undefined or set to an empty string, the hasTitle property returns true, because the question uses its name as a title in this case.

Type:
boolean readonly
Implemented in:
Question
See also:
title * , titleLocation

Specifies whether to hide columns when the matrix does not contain any rows. If you enable this property, the matrix displays the noRowsText message and the Add Row button.

Default value: false

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixDynamicModel
See also:
noRowsText
Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
Question

A value to assign to the id attribute of the rendered HTML element. A default id is generated automatically.

Type:
string writable
Implemented in:
Question

Increases or decreases an indent of survey element content from the left edge. Accepts positive integer values and 0.

Type:
number writable
Implemented in:
SurveyElement

Returns true if columns are placed in the horizontal direction and rows in the vertical direction.

To specify the layout, use the transposeData property. If you set it to true, the survey applies it only when the screen has enough space. Otherwise, the survey falls back to the original layout, but the transposeData property remains set to true. Unlike transposeData, the isColumnLayoutHorizontal property always indicates the current layout.

Type:
boolean readonly
Implemented in:
QuestionMatrixDropdownModelBase
See also:
transposeData

Use this method to find out if the current object is of a given typeName or inherited from it.

Type:
(typeName: string) => boolean
Parameters:
typeName, type: string ,

One of the values listed in the getType() description.

Return Value:

true if the current object is of a given typeName or inherited from it.

Implemented in:
Base
See also:
getType

Returns true if the survey is being designed in Survey Creator.

Type:
boolean readonly
Implemented in:
Base

Returns true if the question value is an empty string, array, or object or if it equals undefined or null.

Type:
() => boolean
Implemented in:
Question

Returns true if the object configuration is being loaded from JSON.

Type:
boolean readonly
Implemented in:
Base

Returns true if the survey element is a page.

This property returns false for PageModel objects in the following cases:

In those cases, the survey creates an internal PageModel object to show all questions on one page, and all regular pages become panels.

Type:
boolean readonly
Implemented in:
SurveyElementCore

Returns true if the survey element is a panel or acts as one.

This property returns true for PageModel objects in the following cases:

In those cases, the survey creates an internal PageModel object to show all questions on one page, and all regular pages become panels.

Type:
boolean readonly
Implemented in:
SurveyElementCore

Returns true if a parent element (page or panel) is visible.

Type:
boolean readonly
Implemented in:
Question

Returns true if the survey element is a question.

Type:
boolean readonly
Implemented in:
SurveyElementCore

Returns true if the survey element or its parent element is read-only.

If you want to switch a survey element to the read-only state based on a condition, specify the enableIf property. Refer to the following help topic for information: Conditional Visibility.

Type:
boolean readonly
Implemented in:
SurveyElement
See also:
readOnly

Makes the question required. If a respondent skips a required question, the survey displays a validation error.

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
Question
See also:
requiredIf * , Data Validation

Returns true if the element is a survey.

Type:
boolean readonly
Implemented in:
SurveyElementCore

Returns true if a passed value is an empty string, array, or object or if it equals to undefined or null.

Type:
(value: any, trimString?: boolean) => boolean
Parameters:
value, type: any ,

A value to be checked.

trimString, type: boolean ,

(Optional) When this parameter is true, the method ignores whitespace characters at the beginning and end of a string value. Pass false to disable this functionality.

Implemented in:
Base

Specifies a key column. Set this property to a column name, and the question will display keyDuplicationError if a user tries to enter a duplicate value in this column.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixDynamicModel
See also:
keyDuplicationError

A survey element identifier.

Question names must be unique.

Type:
string writable
Implemented in:
SurveyElement

A message displayed when the matrix does not contain any rows. Applies only if hideColumnsIfEmpty is enabled.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixDynamicModel
See also:
hideColumnsIfEmpty

An event that is raised when an ItemValue property is changed.

Parameters:

Type:
Event<(sender: Base, options: any) => any, Base, any>
Implemented in:
Base

An event that is raised when a property of this SurveyJS object has changed.

Parameters:

If you need to add and remove property change event handlers dynamically, use the registerPropertyChangedHandlers and unregisterPropertyChangedHandlers methods instead.

Type:
EventBase<Base, any>
Implemented in:
Base

An event that is raised when the question's ready state has changed (expressions are evaluated, choices are loaded from a web resource specified by the choicesByUrl property, etc.).

Parameters:

Type:
EventBase<Question, any>
Implemented in:
Question

Returns a page to which the question belongs and allows you to move this question to a different page.

Type:
IPage writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
Question

Returns a survey element (panel or page) that contains the question and allows you to move this question to a different survey element.

Type:
IPanel writable
Implemented in:
Question

A Dynamic Panel, Dynamic Matrix, or Dropdown Matrix that includes the current question.

This property is null for standalone questions.

Type:
E readonly
Implemented in:
SurveyElement

A placeholder for Dropdown matrix cells.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixDropdownModelBase
See also:
cellType

Makes the survey element read-only.

If you want to switch a survey element to the read-only state based on a condition, specify the enableIf property. Refer to the following help topic for information: Conditional Visibility.

Type:
boolean writable
Implemented in:
SurveyElement
See also:
isReadOnly

Registers a single value change handler for one or multiple properties.

The registerPropertyChangedHandlers and unregisterPropertyChangedHandlers methods allow you to manage property change event handlers dynamically. If you only need to attach an event handler without removing it afterwards, you can use the onPropertyChanged event instead.

Type:
(propertyNames: string[], handler: any, key?: string) => void
Parameters:
propertyNames, type: string[] ,

An array of one or multiple property names.

handler, type: any ,

A function to call when one of the listed properties change. Accepts a new property value as an argument.

key, type: string ,

(Optional) A key that identifies the current registration. If a function for one of the properties is already registered with the same key, the function will be overwritten. You can also use the key to subsequently unregister handlers.

Implemented in:
Base
See also:
unregisterPropertyChangedHandlers

Removes a matrix row with a specified index.

Type:
(index: number, confirmDelete?: boolean, onRowRemoved?: () => void) => void
Parameters:
index, type: number ,

A zero-based row index.

confirmDelete, type: boolean ,

(Optional) A Boolean value that specifies whether to display a confirmation dialog. If you do not specify this parameter, the confirmDelete property value is used.

onRowRemoved, type: () => void

Implemented in:
QuestionMatrixDynamicModel

Use this property to change the default value of remove row button text.

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixDynamicModel

Specifies a custom error message for a required form field.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
Question
See also:
isRequired

A Boolean expression. If it evaluates to true, this question becomes required.

A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.

Refer to the following help topic for more information: Conditional Visibility.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
Question
See also:
isRequired
Type:
string readonly
Implemented in:
Question

A Boolean expression. If it evaluates to true, the question value is reset to default.

A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
Question
See also:
setValueIf

A Boolean expression that is evaluated against each matrix row. If the expression evaluates to false, the row becomes hidden.

A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.

Use the {item} placeholder to reference the current row in the expression.

Refer to the following help topic for more information: Conditional Visibility.

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixBaseModel
See also:
visibleRows * , columnsVisibleIf

A width for the column that displays row titles (first column). Accepts CSS values.

Type:
string writable
Implemented in:
QuestionMatrixBaseModel

Assigns a new value to a specified property.

Type:
(name: string, val: any) => void
Parameters:
name, type: string ,

A property name.

val, type: any ,

A new value for the property.

Implemented in:
Base

Assigns values to a row.

Type:
(rowIndex: number, rowValue: any) => any
Parameters:
rowIndex, type: number ,

A zero-based row index.

rowValue, type: any ,

An object with the following structure: { "column_name": columnValue, ... }

Implemented in:
QuestionMatrixDropdownModelBase
See also:
getRowValue

An expression that calculates the question value.

The setValueExpression is re-evaluated whenever a referenced question's value changes. If you also specify the setValueIf expression, re-evaluation occurs only when it returns true.

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
Question
See also:
defaultValueExpression * , resetValueIf

A Boolean expression. If it evaluates to true, the question value is set to a value calculated using the setValueExpression.

A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
Question
See also:
resetValueIf

Specifies whether to show a number for this question. Setting this property to false hides the question number from the title and excludes the question from numbering.

Default value: false (inherited from the SurveyModel's showQuestionNumbers property)

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
True
Implemented in:
Question
See also:
no

A title template that applies when the survey is in input-per-page mode.

Default value: "Row {rowIndex}" for Dynamic Matrix | "{rowTitle}" for Multi-Select Matrix

The template can contain the following placeholders:

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionMatrixDropdownModelBase

Disable this property if you want to render the current question on the same line or row with the previous question or panel.

View Demo

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
True
Implemented in:
Question

Gets and sets the survey element's expand state.

Possible values:

View Demo

Type:
string writable
Implemented in:
SurveyElement
See also:
toggleState * , collapse * , expand * , isCollapsed * , isExpanded

Returns the survey object.

Type:
ISurvey readonly
Implemented in:
SurveyElement

A title for the survey element. If title is undefined, the name property value is displayed instead.

Empty pages and panels do not display their titles or names.

Type:
string writable
Implemented in:
SurveyElementCore
See also:
Configure Question Titles

Sets question title location relative to the input field. Overrides the questionTitleLocation property specified for the question's container (survey, page, or panel).

Possible values:

Certain question types (Matrix, Multiple Text) do not support the "left" value. For them, the "top" value is used.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
default
Accepted values:
default , top , bottom , left , hidden
Implemented in:
Question
See also:
SurveyModel.questionTitleLocation * , getTitleLocation * , isAllowTitleLeft

Returns a JSON schema that corresponds to the current survey element.

Type:
(options?: ISaveToJSONOptions) => any
Parameters:
options, type: ISaveToJSONOptions ,

An object with configuration options.

options.storeDefaults, type: boolean ,

Pass true if the JSON schema should include properties with default values.

Return Value:

A JSON schema of the survey element.

Implemented in:
Base
See also:
fromJSON

Unregisters value change event handlers for the specified properties.

Type:
(propertyNames: string[], key?: string) => void
Parameters:
propertyNames, type: string[] ,

An array of one or multiple property names.

key, type: string ,

(Optional) A key of the registration that you want to cancel.

Implemented in:
Base
See also:
registerPropertyChangedHandlers

Enables case-sensitive comparison in columns with the isUnique property set to true.

When this property is true, "ABC" and "abc" are considered different values.

Default value: false

Type:
boolean writable
Implemented in:
QuestionMatrixDropdownModelBase
See also:
keyDuplicationError

Specifies whether to use display names for question values in placeholders.

Default value: true

This property applies to questions whose values are defined as objects with the value and text properties (for example, choice items in Radiogroup, Checkbox, and Dropdown questions).

You can use question values as placeholders in the following places:

To use a question value as a placeholder, specify the question name in curly brackets: {questionName}. Refer to the following help topic for more information: Dynamic Texts - Question Values.

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
True
Implemented in:
Question

Validates this question and returns false if the validation fails.

Type:
(fireCallback?: boolean, rec?: any) => boolean
Parameters:
fireCallback, type: boolean ,

(Optional) Pass false if you do not want to show validation errors in the UI.

rec, type: any

Implemented in:
Question
See also:
Data Validation

Question validators.

Data Validation

Type:
SurveyValidator[] writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
Question

Gets or sets the question value.

The following table illustrates how the value type depends on the question type:

Question type Value type(s) Checkboxes Array<string | number> Dropdown string | number Dynamic Matrix Array<object> Dynamic Panel Array<object> Expression string | number | boolean File Upload File | Array<File> HTML (no value) Image (no value) Image Picker Array<string | number> Long Text string Multi-Select Dropdown Array<string | number> Multi-Select Matrix object Multiple Textboxes Array<string> Panel (no value) Radio Button Group string | number Ranking Array<string | number> Rating Scale number | string Slider Array<string | number> Signature string (base64-encoded image) Single-Line Input string | number | Date Single-Select Matrix object Yes/No (Boolean) boolean | string
Type:
any writable
Implemented in:
Question

Specifies an object property that should store the question value.

Refer to the Merge Question Values help topic for more information.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
Question

Aligns matrix cell content in the vertical direction.

Type:
"top" | "middle" readonly

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
middle
Accepted values:
top , middle
Implemented in:
QuestionMatrixBaseModel

Gets or sets question visibility.

If you want to display or hide a question based on a condition, specify the visibleIf property. Refer to the following help topic for information: Conditional Visibility.

Type:
boolean writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
True
Implemented in:
Question
See also:
isVisible * , visibleIf

A Boolean expression. If it evaluates to false, this question becomes hidden.

A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.

Refer to the following help topic for more information: Conditional Visibility.

View Demo

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
Question
See also:
visible * , isVisible

Returns the visible index of the question in the survey. It can be from 0 to all visible questions count - 1 The visibleIndex is -1 if the title is 'hidden' or showNumber is false

Type:
number readonly
Implemented in:
Question
See also:
titleLocation * , showNumber

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4