Fatalfspan Number of Elements Parameter is Lessthanorequalto One Cant Continue
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
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
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
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
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
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
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
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
Call this function to clear all errors in the panel / page and all its child elements (panels and questions)
- Type:
- () => void
- Implemented in:
- PanelModelBase
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
Creates a new object that has the same type and properties as the current SurveyJS object.
- Type:
- () => Base
- Implemented in:
- Base
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
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
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
- Type:
- any readonly
- Implemented in:
- SurveyElement
Explanatory text displayed under the title.
- Type:
- string writable
- Implemented in:
- SurveyElementCore
- See also:
- hasDescription
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
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
Validation errors. Call the hasErrors()
method to validate survey element data.
- Type:
- any writable
- Implemented in:
- SurveyElement
- See also:
- hasErrors
Expands the survey element.
- Type:
- () => void
- Implemented in:
- SurveyElement
- See also:
- state * , toggleState * , collapse * , isCollapsed * , isExpanded
Call it to focus the input of the first question that has an error.
- Type:
- () => void
- Implemented in:
- PanelModelBase
Call it to focus the input on the first question
- Type:
- () => void
- Implemented in:
- PanelModelBase
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
Returns question comments on the current page
- Type:
- () => any
- Implemented in:
- PanelModelBase
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
Returns the element by its name. It works recursively.
- Type:
- (name: string) => IElement
- Parameters:
-
name , type: string ,
the element name
- Implemented in:
- PanelModelBase
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 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
Returns the question by its name
- Type:
- (name: string) => Question
- Parameters:
-
name , type: string ,
the question name
- Implemented in:
- PanelModelBase
Returns the object type as it is used in the JSON schema.
- Type:
- () => string
- Implemented in:
- PanelModelBase
Returns question values on the current page
- Type:
- () => any
- Implemented in:
- PanelModelBase
Returns true
if the survey element has a description.
- Type:
- boolean readonly
- Implemented in:
- SurveyElementCore
- See also:
- description
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
A unique element identificator. It is generated automatically.
- Type:
- string writable
- Implemented in:
- PanelModelBase
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
Returns the index of element parameter in the elements list.
- Type:
- (element: IElement) => number
- Parameters:
-
element , type: IElement ,
question or panel
- Implemented in:
- PanelModelBase
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
- Type:
- boolean readonly
- Implemented in:
- Base
Returns true if the current object is Page and it is the current page.
- Type:
- boolean readonly
- Implemented in:
- PanelModelBase
Returns true
if the survey element is collapsed.
- Type:
- boolean readonly
- Implemented in:
- SurveyElement
- See also:
- state * , toggleState * , collapse * , expand * , isExpanded
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
Returns true
if the survey is being designed in Survey Creator.
- Type:
- boolean readonly
- Implemented in:
- Base
Returns true
if the survey element is expanded.
- Type:
- boolean readonly
- Implemented in:
- SurveyElement
- See also:
- state * , toggleState * , collapse * , expand * , isCollapsed
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.
- Type:
- boolean readonly
- Implemented in:
- SurveyElement
- See also:
- Base.getType
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
Returns true
if the survey element is a question.
- Type:
- boolean readonly
- Implemented in:
- SurveyElement
- See also:
- Base.getType
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
Set this property to true, to require the answer at least in one question in the panel.
- Type:
- boolean writable
- Implemented in:
- PanelModelBase
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. Passfalse
to disable this functionality.
- Implemented in:
- Base
Returns true if object is visible or survey is in design mode right now.
- Type:
- boolean readonly
- Implemented in:
- PanelModelBase
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
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
A survey element identifier.
- Type:
- string writable
- Implemented in:
- SurveyElement
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
An event that is raised when an ItemValue property is changed.
Parameters:
-
sender
- A SurveyJS object whose property contains an array ofItemValue
objects. -
options.obj
- AnItemValue
object. -
options.propertyName
- The name of the property to which an array ofItemValue
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
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 asnewValue
does. -
options.newValue
- A new value for the property.
- Type:
- EventBase<Base>
- Implemented in:
- Base
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
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
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
Returns rendered title text or html.
- Type:
- string readonly
- Implemented in:
- PanelModelBase
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
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
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
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
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 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
Remove an element (Panel or Question) from the elements list.
- Type:
- (element: IElement) => boolean
- Parameters:
-
element , type: IElement
- Implemented in:
- PanelModelBase
- See also:
- elements
Remove question from the elements list.
- Type:
- (question: Question) => void
- Parameters:
-
question , type: Question
- Implemented in:
- PanelModelBase
- See also:
- elements * , removeElement
Returns a calculated width of the rendered survey element in CSS values.
- Type:
- string writable
- Implemented in:
- SurveyElement
- See also:
- width * , minWidth * , maxWidth
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
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
Returns the char/string for a required panel.
- Type:
- string readonly
- Implemented in:
- PanelModelBase
- See also:
- SurveyModel.requiredText
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
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
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
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
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
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 onlytitle
anddescription
and can be expanded in the UI.
- 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
Toggles the survey element's state
between collapsed and expanded.
- Type:
- () => boolean
- Implemented in:
- SurveyElement
- See also:
- state * , collapse * , expand * , isCollapsed * , isExpanded
Returns a JSON object that corresponds to the current SurveyJS object.
- Type:
- () => any
- Implemented in:
- Base
- See also:
- fromJSON
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
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
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
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
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