|
Make a clone of the existing object. Create a new object of the same type and load all properties into it.
- Type:
-
() => Base
- Implemented in:
-
Base
|
|
- Type:
-
() => void
- Implemented in:
-
SurveyElement
- See also:
-
state
|
|
Returns true if a question or a container (panel/page) or their chidren have an error.
The value can be out of date. hasErrors function should be called to get the correct value.
- Type:
-
boolean readonly
- Implemented in:
-
SurveyElement
|
|
Returns all css classes that used for rendering the question, panel or page.
You can use survey.onUpdateQuestionCssClasses event to override css classes for a question, survey.onUpdatePanelCssClasses event for a panel and survey.onUpdatePageCssClasses for a page.
- Type:
-
any readonly
- Implemented in:
-
SurveyElement
- See also:
-
SurveyModel.updateQuestionCssClasses *
, SurveyModel.updatePanelCssClasses *
, SurveyModel.updatePageCssClasses
|
|
The list of errors. It is created by callig hasErrors functions
- Type:
-
any writable
- Implemented in:
-
SurveyElement
- See also:
-
hasErrors
|
|
expand
method
|
|
- Type:
-
() => void
- Implemented in:
-
SurveyElement
- See also:
-
state
|
|
Load object properties and elements. It doesn't reset properties that was changed before and they are not defined in the json parameter.
- Type:
-
(json: any) => void
- Parameters:
-
json, type: any
, the object JSON definition
- Implemented in:
-
Base
- See also:
-
toJSON
|
|
Returns the current survey locale
- Type:
-
() => string
- Implemented in:
-
SurveyElement
- See also:
-
SurveyModel.locale
|
|
Returns the serializable property that belongs to this instance by property name. It returns null if the property is not exists.
- Type:
-
(propName: string) => JsonObjectProperty
- Parameters:
-
propName, type: string
, property name
- Implemented in:
-
Base
|
|
Returns the property value by name
- Type:
-
(name: string, defaultValue?: any) => any
- Parameters:
-
name, type: string
, property name
defaultValue, type: any
- Implemented in:
-
Base
|
|
Returns the element template name without prefix. Typically it equals to getType().
- Type:
-
() => string
- Implemented in:
-
Base
- See also:
-
getType
|
|
Returns the question type.
Possible values:
- Type:
-
() => string
- Implemented in:
-
Base
|
|
Question, Panel and Page description. It renders under element title by using smaller font. Unlike the question title, description can be empty.
Please note, this property is hidden for questions without input, for example html question.
- Type:
-
boolean readonly
- Implemented in:
-
SurveyElementCore
- See also:
-
title
|
|
The left indent. Set this property to increase the survey element left indent.
- Type:
-
number writable
- Implemented in:
-
SurveyElement
|
|
Returns true if the object is inluded into survey, otherwise returns false.
- Type:
-
boolean readonly
- Implemented in:
-
Base
|
|
Returns true if the Element is in the collapsed state
- Type:
-
boolean readonly
- Implemented in:
-
SurveyElement
- See also:
-
state *
, collapse *
, isExpanded
|
|
Use this method to find out if the current instance is of the given typeName or inherited from it.
- Type:
-
(typeName: string) => boolean
- Parameters:
-
typeName, type: string
, One of the values listed in the [getType()](https://surveyjs.io/Documentation/Library?id=surveymodel#getType) description.
- Implemented in:
-
Base
- See also:
-
getType
|
|
Returns true if the question in design mode right now.
- Type:
-
boolean readonly
- Implemented in:
-
Base
|
|
isExpanded
property
|
|
Returns true if the Element is in the expanded state
- Type:
-
boolean readonly
- Implemented in:
-
SurveyElement
- See also:
-
state *
, expand *
, isCollapsed
|
|
Returns true if the object is loading from Json at the current moment.
- Type:
-
boolean readonly
- Implemented in:
-
Base
|
|
Returns true if it is a page.
- Type:
-
boolean readonly
- Implemented in:
-
SurveyElement
|
|
Returns true if it is a panel.
- Type:
-
boolean readonly
- Implemented in:
-
SurveyElement
|
|
Returns true if it is a question.
- Type:
-
boolean readonly
- Implemented in:
-
SurveyElement
|
|
Returns true if a value undefined, null, empty string or empty array.
- Type:
-
(value: any, trimString?: boolean) => boolean
- Parameters:
-
value, type: any
trimString, type: boolean
, a boolean parameter, default value true. If true then it trims the string and functions returns true for a string that contains white spaces only.
- Implemented in:
-
Base
|
|
Use it to set the specific maxWidth constraint to the survey element like css style (%, px, em etc).
- Type:
-
string writable
- Implemented in:
-
SurveyElement
|
|
Use it to set the specific minWidth constraint to the survey element like css style (%, px, em etc).
- Type:
-
string writable
- Implemented in:
-
SurveyElement
|
|
This is the identifier of a survey element - question or panel.
- Type:
-
string writable
- Implemented in:
-
SurveyElement
- See also:
-
valueName
|
|
Event that raised on changing property of the ItemValue object.
sender - the object that owns the property
options.propertyName - the property name to which ItemValue array is belong. It can be "choices" for dropdown question
options.obj - the instance of ItemValue object which property has been changed
options.name - the property of ItemObject that has been changed
options.oldValue - old value
options.newValue - new value
- Type:
-
Event<(sender: Base, options: any) => any, any>
- Implemented in:
-
Base
|
|
Event that raise on property change of the sender object
sender - the object that owns the property
options.name - the property name that has been changed
options.oldValue - old value. Please note, it equals to options.newValue if property is an array
options.newValue - new value.
- Type:
-
EventBase<Base>
- Implemented in:
-
Base
|
|
Set it to true to make an element question/panel/page readonly.
Please note, this property is hidden for question without input, for example html question.
- Type:
-
boolean writable
- Implemented in:
-
SurveyElement
- See also:
-
enableIf *
, isReadOnly
|
|
Register a function that will be called on a property value changed from the names list.
- Type:
-
(names: any, func: any, key?: string) => void
- Parameters:
-
names, type: any
, the list of properties names
func, type: any
, the function with no parameters that will be called on property changed.
key, type: string
, an optional parameter. If there is already a registered function for this property with the same key, it will be overwritten.
- Implemented in:
-
Base
|
|
Register a function that will be called on a property value changed.
- Type:
-
(name: string, func: any, key?: string) => void
- Parameters:
-
name, type: string
, the property name
func, type: any
, the function with no parameters that will be called on property changed.
key, type: string
, an optional parameter. If there is already a registered function for this property with the same key, it will be overwritten.
- Implemented in:
-
Base
|
|
The rendered width of the question.
- Type:
-
string writable
- Implemented in:
-
SurveyElement
|
|
The right indent. Set it different from 0 to increase the right padding.
- Type:
-
number writable
- Implemented in:
-
SurveyElement
|
|
- Type:
-
(name: string, val: any) => void
- Parameters:
-
name, type: string
, property name
val, type: any
, new property value
- Implemented in:
-
Base
|
|
Set this property to "collapsed" to render only Panel title and expanded button and to "expanded" to render the collapsed button in the Panel caption
- Type:
-
string writable
- Implemented in:
-
SurveyElement
|
|
Returns the survey object.
- Type:
-
ISurvey readonly
- Implemented in:
-
SurveyElement
|
|
Question, Panel, Page and Survey title. If page and panel is empty then they are not rendered.
Question renders question name if the title is empty. Use survey questionTitleTemplate property to change the title question rendering.
- Type:
-
string writable
- Implemented in:
-
SurveyElementCore
- See also:
-
SurveyModel.questionTitleTemplate
|
|
- Type:
-
() => boolean
- Implemented in:
-
SurveyElement
- See also:
-
state
|
|
Deserialized the current object into JSON
- Type:
-
() => any
- Implemented in:
-
Base
- See also:
-
fromJSON
|
|
Unregister notification on property value changed for all properties in the names list.
- Type:
-
(names: any, key?: string) => void
- Parameters:
-
names, type: any
, the list of properties names
key, type: string
, the key with which you have registered the notification for this property. It can be null.
- Implemented in:
-
Base
|
|
Unregister notification on property value changed
- Type:
-
(name: string, key?: string) => void
- Parameters:
-
name, type: string
, the property name
key, type: string
, the key with which you have registered the notification for this property. It can be null.
- Implemented in:
-
Base
|
|
Use it to set the specific width to the survey element like css style (%, px, em etc).
- Type:
-
string writable
- Implemented in:
-
SurveyElement
|