Documentation Docs
Documentation Docs

MultipleTextItemModel

A class that describes an item in a Multiple Textboxes question.

View Demo

Inherited from the following class(es):

clone method

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

Type:
() => Base
Implemented in:
Base

An expression used to calculate the default item value.

Type:
string writable

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

Implemented in:
MultipleTextItemModel
See also:
minValueExpression * , maxValueExpression
fromJSON method

Assigns a new configuration to the current SurveyJS object. This configuration is taken from a passed JSON object.

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

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

A JSON object with properties that you want to apply to the current SurveyJS object.

options, type: ILoadFromJSONOptions ,

An object with configuration options.

Implemented in:
Base
See also:
toJSON

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) => 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.

Implemented in:
Base
getType method

Returns the object type as it is used in the JSON schema.

Type:
() => string
Implemented in:
Base
inputType property

A value passed on to the type attribute of the underlying <input> element.

Default value: "text"

Type:
string writable

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

Default value:
text
Accepted values:
color , date , datetime-local , email , month , number , password , range , tel , text , time , url , week
Implemented in:
MultipleTextItemModel
inSurvey property

Returns true if the object is included in a survey.

This property may return false, for example, when you create a survey model dynamically.

Type:
boolean readonly
Implemented in:
Base

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
isDesignMode property

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

Type:
boolean readonly
Implemented in:
Base

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

Type:
boolean readonly
Implemented in:
Base
isRequired property

Marks the item as required. If a respondent leaves this item empty, the question 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:
MultipleTextItemModel
isValueEmpty method

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
maskSettings property

An object with properties that configure the mask applied to the input.

Available properties depend on the specified maskType and belong to corresponding classes. Refer to the class APIs for a full list of properties:

maskType Class
"numeric" InputMaskNumeric
"currency" InputMaskCurrency
"datetime" InputMaskDateTime
"pattern" InputMaskPattern

View Demo

Type:
InputMaskBase writable

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

Implemented in:
MultipleTextItemModel
maskType property

Specifies the type of a mask applied to the input.

Possible values:

  • "none" (default)
  • "numeric"
  • "currency"
  • "datetime"
  • "pattern"

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
Implemented in:
MultipleTextItemModel
See also:
maskSettings
maxLength property

The maximum text length measured in characters. Assign 0 if the length should be unlimited.

Default value: -1 (inherits the actual value from the SurveyModel's maxTextLength property).

Type:
number writable

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

Default value:
-1
Implemented in:
MultipleTextItemModel

An expression used to calculate the maximum item value.

Type:
string writable

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

Implemented in:
MultipleTextItemModel
See also:
minValueExpression * , defaultValueExpression

An expression used to calculate the minimum item value.

Type:
string writable

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

Implemented in:
MultipleTextItemModel
See also:
maxValueExpression * , defaultValueExpression
name property

An item ID that is not visible to respondents.

Item IDs must be unique.

Type:
string writable

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

Implemented in:
MultipleTextItemModel
See also:
title

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

Parameters:

  • sender: this
    A SurveyJS object whose property contains an array of ItemValue objects.
  • options.obj: ItemValue
    An ItemValue object.
  • options.propertyName: string
    The name of the property to which an array of ItemValue objects is assigned (for example, "choices" or "rows").
  • options.name: "text" | "value"
    The name of the changed property.
  • options.newValue: any
    A new value for the property.
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:

  • sender: this
    A SurveyJS object whose property has changed.
  • options.name: string
    The name of the changed property.
  • options.newValue: any
    A new value for the property.
  • options.oldValue: any
    An old value of the property. If the property is an array, oldValue contains the same array as newValue does.
Type:
EventBase<Base, any>
Implemented in:
Base
placeholder property

A placeholder for the input field.

Type:
string writable

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

Implemented in:
MultipleTextItemModel

Registers a function to call when a property value changes.

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.

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

Specifies a custom error message for a required item.

Type:
string writable

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

Implemented in:
MultipleTextItemModel

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
size property

A value passed on to the size attribute of the underlying <input> element.

If you want to set a uniform size for all text box items, use the itemSize within the Multiple Textboxes configuration.

Type:
number writable

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

Implemented in:
MultipleTextItemModel
title property

A user-friendly item label to display. If title is undefined, name is displayed instead.

Type:
string writable

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

Implemented in:
MultipleTextItemModel
toJSON method

Returns a JSON object that corresponds to the current SurveyJS object.

Type:
(options?: ISaveToJSONOptions) => any
Parameters:
options, type: ISaveToJSONOptions
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
validators property

Item 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:
MultipleTextItemModel
value property

An item value.

Type:
any writable
Implemented in:
MultipleTextItemModel

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

Your cookie settings

We use cookies on our site to make your browsing experience more convenient and personal. In some cases, they are essential to making the site work properly. By clicking "Accept All", you consent to the use of all cookies in accordance with our Terms of Use & Privacy Statement. However, you may visit "Cookie settings" to provide a controlled consent.

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.