Fatalfspan Number of Elements Parameter is Lessthanorequalto One Cant Continue

addElement method

Add an element into Panel or Page. Returns true if the element added successfully. Otherwise returns false.

Type:
(element: IElement, index?: number) => boolean
Parameters:

element , type: IElement

index , type: number ,

element index in the elements array

Implemented in:
PanelModelBase
addNewPanel method

Creates a new panel and adds it into the end of the elements list. Returns null, if the panel could not be created or could not be added into page or panel.

Type:
(name?: string) => PanelModel
Parameters:

name , type: string ,

a panel name

Implemented in:
PanelModelBase
addNewQuestion method

Creates a new question and adds it at location of index, by default the end of the elements list. Returns null, if the question could not be created or could not be added into page or panel.

Type:
(questionType: string, name?: string, index?: number) => Question
Parameters:

questionType , type: string ,

the possible values are: "text", "checkbox", "dropdown", "matrix", "html", "matrixdynamic", "matrixdropdown" and so on.

name , type: string ,

a question name

index , type: number ,

element index in the elements array

Implemented in:
PanelModelBase
addPanel method

Add a panel into Panel or Page. Returns true if the panel added successfully. Otherwise returns false.

Type:
(panel: PanelModel, index?: number) => boolean
Parameters:

panel , type: PanelModel

index , type: number ,

element index in the elements array

Implemented in:
PanelModelBase
addPanelsIntoList method

Fill list array with the panels.

Type:
(list: any, visibleOnly?: boolean, includingDesignTime?: boolean) => void
Parameters:

list , type: any

visibleOnly , type: boolean

includingDesignTime , type: boolean

Implemented in:
PanelModelBase
addQuestion method

Add a question into Panel or Page. Returns true if the question added successfully. Otherwise returns false.

Type:
(question: Question, index?: number) => boolean
Parameters:

question , type: Question

index , type: number ,

element index in the elements array

Implemented in:
PanelModelBase
addQuestionsToList method

Fill list array with the questions.

Type:
(list: any, visibleOnly?: boolean, includingDesignTime?: boolean) => void
Parameters:

list , type: any

visibleOnly , type: boolean ,

set it to true to get visible questions only

includingDesignTime , type: boolean

Implemented in:
PanelModelBase
allowAdaptiveActions property

The Panel toolbar gets adaptive if the property is set to 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:
PanelModel
clearErrors method

Call this function to clear all errors in the panel / page and all its child elements (panels and questions)

Type:
() => void
Implemented in:
PanelModelBase
clearIncorrectValues method

Call this function to remove all question values from the current page/panel, that end-user will not be able to enter. For example the value that doesn't exists in a radigroup/dropdown/checkbox choices or matrix rows/columns. Please note, this function doesn't clear values for invisible questions or values that doesn't associated with questions.

Type:
() => void
Implemented in:
PanelModelBase
See also:
Question.clearIncorrectValues
clone method

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

Type:
() => Base
Implemented in:
Base
collapse method

Collapses the survey element.

In collapsed state, the element displays only title and description.

Type:
() => void
Implemented in:
SurveyElement
See also:
title * , description * , state * , toggleState * , expand * , isCollapsed * , isExpanded
containsElement method

Returns true if the current element belongs to the Panel/Page. It looks in nested Panels as well.

Type:
(element: IElement) => boolean
Parameters:

element , type: IElement

Implemented in:
PanelModelBase
See also:
PanelModel
containsErrors property

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 hasErrors method to get an up-to-date value.

Type:
boolean readonly
Implemented in:
SurveyElement
See also:
errors
cssClasses property
Type:
any readonly
Implemented in:
SurveyElement
description property

Explanatory text displayed under the title.

Type:
string writable
Implemented in:
SurveyElementCore
See also:
hasDescription
elements property

Returns the list of the elements in the object, Panel/Page. Elements can be questions or panels. The function doesn't return elements in the nested Panels.

Type:
any readonly

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

Implemented in:
PanelModelBase
enableIf property

An expression that returns true or false. If it returns false the Panel/Page becomes read only and an end-user will not able to answer on qustions inside it. The library runs the expression on survey start and on changing a question value. If the property is empty then readOnly property is used.

Type:
string writable

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

Implemented in:
PanelModelBase
See also:
readOnly * , isReadOnly
errors property

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

Type:
any writable
Implemented in:
SurveyElement
See also:
hasErrors
expand method

Expands the survey element.

Type:
() => void
Implemented in:
SurveyElement
See also:
state * , toggleState * , collapse * , isCollapsed * , isExpanded
focusFirstErrorQuestion method

Call it to focus the input of the first question that has an error.

Type:
() => void
Implemented in:
PanelModelBase
focusFirstQuestion method

Call it to focus the input on the first question

Type:
() => void
Implemented in:
PanelModelBase
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) => void
Parameters:

json , type: any ,

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

Implemented in:
Base
See also:
toJSON
getComments method

Returns question comments on the current page

Type:
() => any
Implemented in:
PanelModelBase
getDisplayValue method

Return questions values as a JSON object with display text. For example, for dropdown, it would return the item text instead of item value.

Type:
(keysAsText: boolean) => any
Parameters:

keysAsText , type: boolean ,

Set this value to true, to return key (in matrices questions) as display text as well.

Implemented in:
PanelModelBase
getElementByName method

Returns the element by its name. It works recursively.

Type:
(name: string) => IElement
Parameters:

name , type: string ,

the element name

Implemented in:
PanelModelBase
getLocale method

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
getPropertyByName method

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
getPropertyValue method

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
getQuestionByName method

Returns the question by its name

Type:
(name: string) => Question
Parameters:

name , type: string ,

the question name

Implemented in:
PanelModelBase
getType method

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

Type:
() => string
Implemented in:
PanelModelBase
getValue method

Returns question values on the current page

Type:
() => any
Implemented in:
PanelModelBase
hasDescription property

Returns true if the survey element has a description.

Type:
boolean readonly
Implemented in:
SurveyElementCore
See also:
description
hasErrors method

Returns true, if there is an error on this Page or inside the current Panel

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

fireCallback , type: boolean ,

set it to true, to show errors in UI

focusOnFirstError , type: boolean ,

set it to true to focus on the first question that doesn't pass the validation

rec , type: any

Implemented in:
PanelModelBase
id property

A unique element identificator. It is generated automatically.

Type:
string writable
Implemented in:
PanelModelBase
indent property

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

Type:
number writable
Implemented in:
SurveyElement
See also:
rightIndent
indexOf method

Returns the index of element parameter in the elements list.

Type:
(element: IElement) => number
Parameters:

element , type: IElement ,

question or panel

Implemented in:
PanelModelBase
innerIndent property

The inner indent. Set this property to increase the panel content margin.

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
Implemented in:
PanelModel
inSurvey property
Type:
boolean readonly
Implemented in:
Base
isActive property

Returns true if the current object is Page and it is the current page.

Type:
boolean readonly
Implemented in:
PanelModelBase
isCollapsed property

Returns true if the survey element is collapsed.

Type:
boolean readonly
Implemented in:
SurveyElement
See also:
state * , toggleState * , collapse * , expand * , isExpanded
isDescendantOf method

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.

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

Returns true if the survey element is expanded.

Type:
boolean readonly
Implemented in:
SurveyElement
See also:
state * , toggleState * , collapse * , expand * , isCollapsed
isLoadingFromJson property

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

Type:
boolean readonly
Implemented in:
Base
isPage property

Returns true if the survey element is a page.

Type:
boolean readonly
Implemented in:
SurveyElement
See also:
Base.getType
isPanel property

Returns true if the current object is Panel. Returns false if the current object is Page (a root Panel).

Type:
boolean readonly
Implemented in:
PanelModelBase
isQuestion property

Returns true if the survey element is a question.

Type:
boolean readonly
Implemented in:
SurveyElement
See also:
Base.getType
isReadOnly property

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

Set this property to true, to require the answer at least in one question in the panel.

Type:
boolean writable
Implemented in:
PanelModelBase
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
isVisible property

Returns true if object is visible or survey is in design mode right now.

Type:
boolean readonly
Implemented in:
PanelModelBase
maxWidth property

Gets or sets maximum survey element width in CSS values.

Default value: "100%" (taken from settings.maxWidth)

Type:
string writable
Implemented in:
SurveyElement
See also:
minWidth * , renderWidth * , width
minWidth property

Gets or sets minimum survey element width in CSS values.

Default value: "300px" (taken from settings.minWidth)

Type:
string writable
Implemented in:
SurveyElement
See also:
maxWidth * , renderWidth * , width
name property

A survey element identifier.

Type:
string writable
Implemented in:
SurveyElement
no property

The property returns the question number. If question is invisible then it returns empty string. If visibleIndex is 1, then no is 2, or 'B' if survey.questionStartIndex is 'A'.

Type:
string readonly
Implemented in:
PanelModel
See also:
SurveyModel.questionStartIndex
onItemValuePropertyChanged event

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

Parameters:

  • sender - A SurveyJS object whose property contains an array of ItemValue objects.
  • options.obj - An ItemValue object.
  • options.propertyName - The name of the property to which an array of ItemValue objects is assigned (for example, "choices" or "rows").
  • options.name - The name of the changed property: "text" or "value".
  • options.newValue - A new value for the property.
Type:
Event<(sender: Base, options: any) => any, any>
Implemented in:
Base
onPropertyChanged event

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

Parameters:

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

Get/set the page where the panel is located.

Type:
IPage writable

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

Implemented in:
PanelModel
parent property

A parent element. It is always null for the Page object and always not null for the Panel object. Panel object may contain Questions and other Panels.

Type:
PanelModelBase writable
Implemented in:
PanelModelBase
parentQuestion property

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

Returns rendered title text or html.

Type:
string readonly
Implemented in:
PanelModelBase
questions property

Returns the list of all questions located in the Panel/Page, including in the nested Panels.

Type:
any readonly
Implemented in:
PanelModelBase
See also:
Question * , elements
questionsOrder property

Use this property to randomize questions. Set it to 'random' to randomize questions, 'initial' to keep them in the same order or 'default' to use the Survey questionsOrder property

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 , initial , random
Implemented in:
PanelModelBase
See also:
SurveyModel.questionsOrder * , areQuestionsRandomized
questionStartIndex property

Gets or sets the first question index for elements inside the panel. The first question index is '1.' by default and it is taken from survey.questionStartIndex property. You may start it from '100' or from 'A', by setting '100' or 'A' to this property. You can set the start index to "(1)" or "# A)" or "a)" to render question number as (1), # A) and a) accordingly.

Type:
string writable

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

Implemented in:
PanelModel
See also:
survey.questionStartIndex
questionTitleLocation property

Set this property different from "default" to set the specific question title location for this panel/page.

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:
PanelModelBase
See also:
SurveyModel.questionTitleLocation
readOnly property

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
registerPropertyChangedHandlers method

Registers a function to call when a property value changes.

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

propertyNames , type: any ,

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 ,

an optional parameter. If there is already a registered function for this property with the same key, it will be overwritten.

Implemented in:
Base
See also:
unregisterPropertyChangedHandlers
removeElement method

Remove an element (Panel or Question) from the elements list.

Type:
(element: IElement) => boolean
Parameters:

element , type: IElement

Implemented in:
PanelModelBase
See also:
elements
removeQuestion method

Remove question from the elements list.

Type:
(question: Question) => void
Parameters:

question , type: Question

Implemented in:
PanelModelBase
See also:
elements * , removeElement
renderWidth property

Returns a calculated width of the rendered survey element in CSS values.

Type:
string writable
Implemented in:
SurveyElement
See also:
width * , minWidth * , maxWidth
requiredErrorText property

The custom text that will be shown on required error. Use this property, if you do not want to show the default text.

Type:
string writable
Implemented in:
PanelModelBase
requiredIf property

An expression that returns true or false. If it returns true the Panel/Page becomes required. The library runs the expression on survey start and on changing a question value. If the property is empty then isRequired property is used.

Type:
string writable

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

Implemented in:
PanelModelBase
See also:
isRequired
requiredText property

Returns the char/string for a required panel.

Type:
string readonly
Implemented in:
PanelModelBase
See also:
SurveyModel.requiredText
rightIndent property

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

Type:
number writable
Implemented in:
SurveyElement
See also:
indent
setPropertyValue method

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

Set showNumber to true to start showing the number for this panel.

Type:
boolean writable

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

Implemented in:
PanelModel
See also:
visibleIndex
showQuestionNumbers property

Gets or sets a value that specifies how the elements numbers inside panel are displayed.

The following options are available:

  • default - display questions numbers as defined in parent panel or survey
  • onpanel - display questions numbers, start numbering from beginning of this page
  • off - turn off the numbering for questions titles
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 , onpanel , off
Implemented in:
PanelModel
See also:
showNumber
startWithNewLine property

The Panel renders on the new line if the property is true. If the property is false, the panel tries to render on the same line/row with a previous question/panel.

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:
PanelModel
state property

Gets and sets the survey element's expand state.

Possible values:

  • "default" (default) - The survey element is displayed in full and cannot be collapsed in the UI.
  • "expanded" - The survey element is displayed in full and can be collapsed in the UI.
  • "collapsed" - The survey element displays only title and description and can be expanded in the UI.
Type:
string writable
Implemented in:
SurveyElement
See also:
toggleState * , collapse * , expand * , isCollapsed * , isExpanded
survey property

Returns the survey object.

Type:
ISurvey readonly
Implemented in:
SurveyElement
title property

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
toggleState method

Toggles the survey element's state between collapsed and expanded.

Type:
() => boolean
Implemented in:
SurveyElement
See also:
state * , collapse * , expand * , isCollapsed * , isExpanded
toJSON method

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

Type:
() => any
Implemented in:
Base
See also:
fromJSON
unregisterPropertyChangedHandlers method

Unregisters value change event handlers for the specified properties.

Type:
(propertyNames: any, key?: string) => void
Parameters:

propertyNames , type: any ,

An array of one or multiple property names.

key , type: string ,

the key with which you have registered the notification for this property. It can be null.

Implemented in:
Base
See also:
registerPropertyChangedHandlers
visible property

Use it to get/set the object 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:
PanelModelBase
See also:
visibleIf
visibleIf property

An expression that returns true or false. If it returns true the Panel becomes visible and if it returns false the Panel becomes invisible. The library runs the expression on survey start and on changing a question value. If the property is empty then visible property is used.

Type:
string writable

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

Implemented in:
PanelModelBase
See also:
visible
visibleIndex property

Returns the visible index of the panel in the survey. Commonly it is -1 and it doesn't show. You have to set showNumber to true to show index/numbering for the Panel

Type:
number readonly
Implemented in:
PanelModel
See also:
showNumber
width property

Sets survey element width in CSS values.

Default value: ""

Type:
string writable
Implemented in:
SurveyElement
See also:
minWidth * , maxWidth

staufferinece1988.blogspot.com

Source: https://surveyjs.io/form-library/documentation/panelmodel

0 Response to "Fatalfspan Number of Elements Parameter is Lessthanorequalto One Cant Continue"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel