|
Add a question into Toolbox object
- Type:
-
(question: Question) => void
- Parameters:
-
question, type: Question
, an added Survey.Question
- Implemented in:
-
SurveyCreator
- See also:
-
toolbox
|
|
Add a new page into the editing survey. Returns the new created page instance
- Type:
-
() => Page readonly
- Implemented in:
-
SurveyCreator
|
|
Set it to false if you want to deny user to hide/show survey title.
- Type:
-
boolean writable
- Implemented in:
-
SurveyCreator
|
|
You need to set this property to false to allow your users build expressions visually only, without editing them in text editor.
- Type:
-
boolean readonly
- Implemented in:
-
CreatorBase
|
|
Set this property to false to disable pages adding, editing and deleting
- Type:
-
boolean readonly
- Implemented in:
-
CreatorBase
|
|
The delay on saving survey JSON on autoSave in ms. It is 500 ms by default.
If during this period of time an end-user modify survey, then the last version will be saved only. Set to 0 to save immediately.
- Type:
-
number readonly
- Implemented in:
-
SurveyCreator
- See also:
-
isAutoSave
|
|
Set JSON as text into survey. Clear undo/redo states optionally.
- Type:
-
(value: string, clearState?: boolean) => void
- Parameters:
-
value, type: string
, JSON as text
clearState, type: boolean
, default false. Set this parameter to true to clear undo/redo states.
- Implemented in:
-
CreatorBase
|
|
Set JSON as text into survey. Clear undo/redo states optionally.
- Type:
-
(value: string, clearState?: boolean) => void
- Parameters:
-
value, type: string
, JSON as text
clearState, type: boolean
, default false. Set this parameter to true to clear undo/redo states.
- Implemented in:
-
SurveyCreator
|
|
- Type:
-
(input: HTMLInputElement, onFilesChosen: (files: File[]) => void) => void
- Parameters:
-
input, type: HTMLInputElement
, file input element
onFilesChosen, type: (files: File[]) => void
, a call back function to process chosen files
- Implemented in:
-
SurveyCreator
|
|
Clear the files on a server
- Type:
-
(files: any[], clearCallback: (status: string, data: any) => any) => void
- Parameters:
-
files, type: any[]
, files data (byte array or URI) to clear
clearCallback, type: (status: string, data: any) => any
, a call back function to get the status on removed the files
- Implemented in:
-
SurveyCreator
|
|
Set it to "cancel" or "apply" to enable closing modal windows by clicking outside popup.
If "apply" is set, then changes will be saved, otherwise not. By default value is "off"
- Type:
-
"off" | "cancel" | "apply" writable
- Implemented in:
-
SurveyCreator
|
|
Collapse all property editor tabs (accordions) in properties panel
- Type:
-
() => void
- Implemented in:
-
SurveyCreator
|
|
Collapse certain property editor tab (accordion) in properties panel
name - tab category name
- Type:
-
(name: string) => void
- Parameters:
-
name, type: string
- Implemented in:
-
SurveyCreator
|
|
Create a new page with the same elements and place it next to the current one. It returns the new created Survey.Page
- Type:
-
(page: PageModel) => PageModel readonly
- Implemented in:
-
SurveyCreator
|
|
Get and set the maximum of copied questions/panels in the toolbox. The default value is 3
- Type:
-
number writable
- Implemented in:
-
SurveyCreator
|
|
Delete an element in the survey. It can be a question, a panel or a page.
- Type:
-
(element: Base) => void
- Parameters:
-
element, type: Base
, a survey element.
- Implemented in:
-
CreatorBase
|
|
expandAllPropertyTabs
method
|
|
Expand all property editor tabs (accordions) in properties panel
- Type:
-
() => void
- Implemented in:
-
SurveyCreator
|
|
expandPropertyTab
method
|
|
Expand certain property editor tab (accordion) in properties panel
name - tab category name
- Type:
-
(name: string) => void
- Parameters:
-
name, type: string
- Implemented in:
-
SurveyCreator
|
|
Copy a question to the active page
- Type:
-
(question: Base) => void
- Parameters:
-
question, type: Base
, A copied Survey.Question
- Implemented in:
-
CreatorBase
|
|
This callback is called on changing "Generate Valid JSON" option.
- Type:
-
(generateValidJSON: boolean) => void readonly
- Implemented in:
-
SurveyCreator
|
|
Returns the localized string by its id
- Type:
-
(str: string) => any
- Parameters:
-
str, type: string
, the string id.
- Implemented in:
-
CreatorBase
|
|
This callback is used internally for providing survey JSON text.
- Type:
-
() => { text: string; isModified: boolean; } readonly
- Implemented in:
-
CreatorBase
|
|
You have right to set this property to true if you have bought the commercial licence only.
It will remove the text about non-commerical usage on the top of the widget.
Setting this property true without having a commercial licence is illegal.
- Type:
-
boolean writable
- Implemented in:
-
CreatorBase
- See also:
-
haveCommercialLicense
|
|
Obsolete from v1.5.1
Set it to false to temporary hide the Property Grid on the right side of the creator. User will be able to show the Property Grid again via the click on the 'Advanced' label. It allows to edit the properties of the selected object (question/panel/page/survey).
- Type:
-
boolean writable
- Implemented in:
-
SurveyCreator
|
|
You need to set this property to true if you want to inplace edit item values instead of texts.
- Type:
-
boolean writable
- Implemented in:
-
SurveyCreator
- See also:
-
inplaceEditForValues
|
|
A boolean property, false by default. Set it to true to call protected doSave method automatically on survey changing.
- Type:
-
boolean writable
- Implemented in:
-
CreatorBase
|
|
Set it to true to activate RTL support
- Type:
-
boolean writable
- Implemented in:
-
CreatorBase
|
|
The Survey JSON. Use it to get Survey JSON or change it.
- Type:
-
any writable
- Implemented in:
-
CreatorBase
- See also:
-
text
|
|
Return the logic mode object.
- Type:
-
SurveyLogic readonly
- Implemented in:
-
SurveyCreator
- See also:
-
showLogicTab
|
|
Change the active view/tab. It will return false if it can't change the current tab.
- Type:
-
(viewName: string) => boolean
- Parameters:
-
viewName, type: string
, name of new active view (tab). The following values are available: "designer", "editor", "test", "embed" and "translation".
- Implemented in:
-
CreatorBase
|
|
maximumColumnsCount
property
|
|
You need to set this property to number more than 0 to limit the number of columns that users can create for matrix dynamic/matrix dropdown questions.
- Type:
-
number readonly
- Implemented in:
-
CreatorBase
|
|
You need to set this property to value bigger than 0 to disable adding more logic items in condition than this value.
- Type:
-
number readonly
- Implemented in:
-
CreatorBase
|
|
This function triggers user notification (via the alert() function if no onNotify event handler added).
- Type:
-
(msg: string) => void
- Parameters:
-
msg, type: string
- Implemented in:
-
SurveyCreator
- See also:
-
onNotify
|
|
The event is called when creator active tab is changed.
sender the survey creator object that fires the event
options.tabName the name of new active tab
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
Use this event to get access rendered adorder.
sender the survey creator object that fires the event.
options.survey the editing survey object.
options.question the survey element of the adorner.
options.adorner the adorner id.
options.element a root adorner element.
options.context a context for adorner element, e.g. current item of a select base question.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is called after redo happens.
options.state is an undo/redo item.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is called after undo happens.
options.state is an undo/redo item.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is called before redo happens.
options.canRedo a boolean value. It is true by default. Set it false to hide prevent redo operation.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is called before undo happens.
options.canUndo a boolean value. It is true by default. Set it false to hide prevent undo operation.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
onCanDeleteItem
event
|
|
The event is called before rendering a delete button in the Property Grid or in Question Editor.
sender the survey creator object that fires the event
options.obj the survey Question
options.item the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
options.canDelete a boolean value. It is true by default. Set it false to remove delete button from the Property Grid or in Question Editor
- Type:
-
Event<(sender: CreatorBase<T>, options: any) => any, any>
- Implemented in:
-
CreatorBase
|
|
Obsolete, please use onShowingProperty event.
The event is called before showing a property in the Property Grid or in Question Editor.
sender the survey creator object that fires the event
options.obj the survey object, Survey, Page, Panel or Question
options.property the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties.
options.canShow a boolean value. It is true by default. Set it false to hide the property from the Property Grid or in Question Editor
options.parentObj the parent object. It is null for non-nested properties. It is not null for itemvalue or column objects. The parent object is a question (dropdown, radigroup, checkbox, matrices and so on).
options.parentProperty the parent property (Survey.JsonObjectProperty object). It is null for non-nested properties. It is not null for itemvalue or column objects. The parent object is choices, columns, rows, triggers and so on.
- Type:
-
Event<(sender: CreatorBase<T>, options: any) => any, any>
- Implemented in:
-
CreatorBase
|
|
The event is fired on clearing the files.
sender the survey creator object that fires the event
There are following properties in options:
files - value to clear (it can be a byte array or an URI of a resource)
callback - called on clear complete
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
- See also:
-
clearFiles
|
|
The event is called on deleting a collection item from the Property Editor. For example: column in columns editor or item in choices and so on.
sender the survey creator object that fires the event
options.obj the survey object: Question, Panel, Page or Survey
options.property the collection property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
options.propertyName the collection property name
options.collection the editing collection where deleting item is located. It is can be columns in the matrices or choices in dropdown question and so on.
options.item the collection item that we are going to delete
options.allowDelete a boolean value. It is true by default. Set it false to abondome the element removing from the collection
- Type:
-
Event<(sender: CreatorBase<T>, options: any) => any, any>
- Implemented in:
-
CreatorBase
|
|
Use this event to modify the list (name and titles) of the questions available in a condition editor.
sender the survey creator object that fires the event
options.obj the survey object which property is edited in the Property Editor.
options.propertyName the name of the edited property.
options.editor the instance of Property Editor.
options.list the list of the questions available for condition
- Type:
-
Event<(sender: CreatorBase<T>, options: any) => any, any>
- Implemented in:
-
CreatorBase
|
|
Use this event to modify the survey that used on setting value for condition/expression properties, like visibleIf, enableIf and so on.
sender the survey creator object that fires the event
options.obj the survey object which property is edited in the Property Editor.
options.propertyName the name of the edited property.
options.editor the instance of Property Editor.
options.valueQuestionName the name of the question that shows in the survey for choosing the value
options.survey the instance of the survey that allows to choose the value. You may modify it before it shows to the end-user
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is called when end-user addes new element (question or panel) into the survey toolbox.
sender the survey creator object that fires the event
options.element is a new added element
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
- See also:
-
onCustomElementAddingIntoToolbox
|
|
The event is called when end-user addes new element (question or panel) into the survey toolbox.
It calls before adding the element into toolbox and it allows to change the toolbox item attributes using options.itemOptions parameter
sender the survey creator object that fires the event
options.element is a new added element
options.itemOptions a json object that allows you to override question properties. Attributes are: name, title, isCopied, iconName, json and category.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
- See also:
-
onCustomElementAddedIntoToolbox
|
|
The event allows you to custom sort properties in the Property Grid. It is a compare function. You should set options.result to -1 or 1 by comparing options.property1 and options.property2.
sender the survey creator object that fires the event
options.obj the survey object, Survey, Page, Panel or Question
options.property1 the left object property (Survey.JsonObjectProperty object).
options.property2 the right object property (Survey.JsonObjectProperty object).
options.result the result of comparing. It can be 0 (use default behavior), -1 options.property1 is less than options.property2 or 1 options.property1 is more than options.property2
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is fired when the survey creator is initialized and a survey object (Survey.Survey) is created.
sender the survey creator object that fires the event
options.survey the survey object showing in the creator.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
Use this event to control drag&drop operations.
sender the survey creator object that fires the event.
options.survey the editing survey object.
options.allow set it to false to disable dragging.
options.target a target element that is dragging.
options.source a source element. It can be null, if it is a new element, dragging from toolbox.
options.parent a page or panel where target element is dragging.
options.insertBefore an element before the target element is dragging. It can be null if parent container (page or panel) is empty or dragging an element under the last element of the container.
options.insertAfter an element after the target element is dragging. It can be null if parent container (page or panel) is empty or dragging element to the top of the parent container.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is called when creator tab has been rendered.
sender the survey creator object that fires the event
options.tabName the name of the rendered tab
options.elements the rendered elements
options.model current context model
options.tabData the data of the rendered tab
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
Use this event to disable some operations for an element (question/panel).
sender the survey creator object that fires the event
options.obj the survey object question/panel
options.allowDelete set it to false to disable deleting the object
options.allowEdit set it to false to disable calling the modal Editor
options.allowCopy set it to false to disable copying the object
options.allowAddToToolbox set it to false to disable adding element to Toolbox
options.allowDragging set it to false to disable adding element to Toolbox
options.allowChangeType set it to false to disable changing element type
options.allowChangeRequired set it to false to disable changing isRequired property
options.allowShowHideTitle set it to false to disable changing titleLocation property to hidden/default
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is called on deleting an element (question/panel/page) from the survey. Typically, when a user click the delete from the element menu.
sender the survey creator object that fires the event
options.element an instance of the deleting element
options.elementType the type of the element: 'question', 'panel' or 'page'.
options.allowing set it to false to cancel the element deleting
- Type:
-
Event<(sender: CreatorBase<T>, options: any) => any, any>
- Implemented in:
-
CreatorBase
|
|
The event is called when an end-user double click on an element (question/panel).
sender the survey creator object that fires the event
options.element an instance of the element
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is called after user closes the popup element editor.
options.element the edited element.
options.isCanceled indicated user clicked Cancel.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is fired on changing question, panel or page name.
sender the survey creator object that fires the event
options.obj the object (question, panel or page)
options.oldName the previous name of the element
options.newName the new name of the element
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is called on generation a new name for a new created element.
sender the survey creator object that fires the event
options.element a new created survey element. It can be question, panel or page
options.name a new suggested name, that is unique for the current survey. You can suggest your own name. If it is unique, creator will assign it to the element.
options.isUnique a boolean property, set this property to false, if you want to ask Creator to generate another name
- Type:
-
Event<(sender: CreatorBase<T>, options: any) => any, any>
- Implemented in:
-
CreatorBase
|
|
The event allows to display the custom name for objects: questions, pages and panels. By default the object name is using. You may show object title by setting showObjectTitles property to true.
Use this event, if you want custom display name for objects.
sender the survey creator object that fires the event
options.obj the survey object, Survey, Page, Panel or Question
options.reason the name of the UI that requests the object display name
options.displayName change this property to show your custom display name for the object
- Type:
-
Event<(sender: CreatorBase<T>, options: any) => any, any>
- Implemented in:
-
CreatorBase
- See also:
-
showObjectTitles
|
|
Obsolete, please use onGetObjectDisplayName event
Use this event to change the text showing in the dropdown of the property grid.
sender the survey creator object that fires the event
options.obj the survey object.
options.text the current object text, commonly it is a name. You must change this attribute
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
- See also:
-
onGetObjectDisplayName
|
|
The event is called on setting a readOnly property of the property editor. By default the property.readOnly property is used.
You may changed it and make the property editor read only or enabled for a particular object.
sender the survey creator object that fires the event
options.obj the survey object, Survey, Page, Panel or Question
options.property the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties.
options.readOnly a boolean value. It has value equals to options.readOnly property by default. You may change it.
- Type:
-
Event<(sender: CreatorBase<T>, options: any) => any, any>
- Implemented in:
-
CreatorBase
|
|
The event is called on adding a new Survey.ItemValue object. It uses as an element in choices array in Radiogroup, checkbox and dropdown questions or Matrix columns and rows properties.
Use this event, to set ItemValue.value and ItemValue.text properties by default or set a value to the custom property.
sender the survey creator object that fires the event
options.obj the object that contains the itemsValues array, for example selector, rating and single choice matrix questions.
options.propertyName the object property Name. It can be "choices" for selector questions or rateValues for rating question or columns/rows for single choice matrix.
options.newItem a new created Survey.ItemValue object.
options.itemValues an editing Survey.ItemValue array. newItem object is not added yet into this array.
- Type:
-
Event<(sender: CreatorBase<T>, options: any) => any, any>
- Implemented in:
-
CreatorBase
|
|
onKeyDownHandler
method
|
|
Use this method to create keyboard shortcuts
- Type:
-
(e: any, creator: any) => void
- Parameters:
-
e, type: any
, keydown event
creator, type: any
, creator instance
- Implemented in:
-
SurveyCreator
|
|
onMatrixColumnAdded
event
|
|
The event is called when a user adds a new column into MatrixDropdown or MatrixDynamic questions. Use it to set some properties of Survey.MatrixDropdownColumn by default, for example name or a custom property.
sender the survey creator object that fires the event
options.matrix a matrix question where column is located, matrix.columns.
options.newColumn a new created Survey.MatrixDropdownColumn object.
options.columns editable columns objects. They can be different from options.matrix.columns. options.columns and options.matrix.columns are equal after user press Apply or Cancel and options.columns will be set to options.matrix.columns or reset to initial state.
- Type:
-
Event<(sender: CreatorBase<T>, options: any) => any, any>
- Implemented in:
-
CreatorBase
|
|
The event is called when a survey is changed in the designer. A new page/question/page is added or existing is removed, a property is changed and so on.
sender the survey creator object that fires the event
options object contains the information about certain modifications
options.type contains string constant describing certain modification
Available values:
options.type: "ADDED_FROM_TOOLBOX"
options.question: newly added question
options.type: "PAGE_ADDED"
options.newValue: newly created page
options.type: "PAGE_MOVED"
options.page: page has been moved
options.indexFrom: pevious index
options.indexTo: new index
options.type: "QUESTION_CONVERTED"
options.className: the converted class name
options.oldValue: pevious object
options.newValue: the new object, converted from oldVale to the given class name
options.type: "QUESTION_CHANGED_BY_EDITOR"
options.question: question has been edited in the popup question editor
options.type: "PROPERTY_CHANGED"
options.name: the name of the property has been changed
options.target: the object containing the changed property
options.oldValue: the previous value of the changed property
options.newValue: the new value of the changed property
options.type: "OBJECT_DELETED"
options.target: deleted object
options.type: "VIEW_TYPE_CHANGED"
options.newType: new type of the creator view: editor or designer
options.type: "DO_DROP"
options.page: the page of the drap/drop operation
options.source: the source dragged object
options.target: the drop target
options.newElement: a new element. It is defined if a user drops question or panel from the toolbox
options.type: "TRANSLATIONS_CHANGED"
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is called in case of UI notifications. By default all notifications are done via built-in alert () function.
In case of any subscriptions to this event all notifications will be redirected into the event handler.
options.message is a message to show.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is fired then one need to choose files.
sender the survey creator object that fires the event
input file input HTML element
callback need to be called after files has been chosen
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
- See also:
-
uploadFile
|
|
The event is called on adding a new page into the survey.
sender the survey creator object that fires the event
options.page the new survey Page object.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is called on adding a new panel into the survey. Typically, when a user dropped a Panel from the Question Toolbox into designer Survey area.
sender the survey creator object that fires the event
options.panel a new added survey panel. Survey.Panel object
options.page the survey Page object where question has been added.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event allows you modify DOM element for a property in the Property Grid. For example, you may change its styles.
sender the survey creator object that fires the event
options.obj the survey object, Survey, Page, Panel or Question
options.htmlElement the html element that renders the property display name and its editor.
options.property object property (Survey.JsonObjectProperty object).
options.propertyEditor the property Editor.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
Use this event to process key down event in a property editor
sender the survey creator object that fires the event
options.obj the survey object which property is edited in the Property Editor.
options.propertyName the name of the edited property.
options.editor the instance of Property Editor.
options.event the instance of mouse event.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
Use this event to change the value entered in the property editor. You may call a validation, so an end user sees the error immediately
sender the survey creator object that fires the event
options.obj the survey object which property is edited in the Property Editor.
options.propertyName the name of the edited property.
options.editor the instance of Property Editor.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
- See also:
-
onPropertyValueChanging
|
|
Use this event to show a custom error in the Question Editor on pressing Apply or OK buttons, if the values are not set correctly. The error will be displayed under the property editor.
sender the survey creator object that fires the event
options.obj the survey object which property is edited in the Property Editor.
options.propertyName the name of the edited property.
options.value the property value.
options.error the error you want to display. Set the empty string (the default value) or null if there is no errors.
- Type:
-
Event<(sender: CreatorBase<T>, options: any) => any, any>
- Implemented in:
-
CreatorBase
- See also:
-
onPropertyValueChanging
|
|
Use this event to change the value entered in the property editor. You may call a validation, so an end user sees the error immediately
sender the survey creator object that fires the event
options.obj the survey object which property is edited in the Property Editor.
options.propertyName the name of the edited property.
options.value the property value.
options.newValue set the corrected value into this property. Leave it null if you are ok with the entered value.
options.doValidation set the value to true to call the property validation. If there is an error, the user sees it immediately.
- Type:
-
Event<(sender: CreatorBase<T>, options: any) => any, any>
- Implemented in:
-
CreatorBase
- See also:
-
onPropertyValidationCustomError
|
|
The event is called on adding a new question into the survey. Typically, when a user dropped a Question from the Question Toolbox into designer Survey area.
sender the survey creator object that fires the event
options.question a new added survey question. Survey.Question object
options.page the survey Page object where question has been added.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is called after the selected element is changed.
options.newSelectedElement the new selected element in the survey desiger: question, panel, page or survey.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is called on changing the selected element. You may change the new selected element by changing the property options.newSelectedElement to your own
options.newSelectedElement the element that is going to be selected in the survey desiger: question, panel, page or survey.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
Use this event to control Property Editors UI.
sender the survey creator object that fires the event
options.obj the survey object which property is edited in the Property Editor.
options.propertyName the name of the edited property.
options.editorOptions options that can be changed.
options.editorOptions.allowAddRemoveItems a boolean property, true by default. Set it false to disable add/remove items in array properties. For example 'choices', 'columns', 'rows'.
options.editorOptions.allowRemoveAllItems a boolean property, true by default. Set it false to disable remove all items in array properties. For example 'choices', 'columns', 'rows'.
options.editorOptions.showTextView a boolean property, true by default. Set it false to disable "Fast Entry" tab for "choices" property.
options.editorOptions.itemsEntryType a string property, 'form' by default. Set it 'fast' to show "Fast Entry" tab for "choices" property by default.
- Type:
-
Event<(sender: CreatorBase<T>, options: any) => any, any>
- Implemented in:
-
CreatorBase
|
|
The event is called before showing a property in the Properties Grid or in the Question Editor.
sender the survey creator object that fires the event
options.obj the survey object, Survey, Page, Panel or Question
options.property the object property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties.
options.canShow a boolean value. It is true by default. Set it false to hide the property from the Properties Grid and in the Question Editor.
Example: Hide a category in the Properties Grid
- Type:
-
Event<(sender: CreatorBase<T>, options: any) => any, any>
- Implemented in:
-
CreatorBase
|
|
Use this event to show the description on the top or/and bottom of the property modal editor.
sender the survey creator object that fires the event
options.obj the survey object which property is edited in the Property Editor.
options.propertyName the property name
options.htmlTop the html that you want to see on the top of the modal window
options.htmlBottom the html that you want to see on the bottom of the modal window
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The event is fired when the survey creator creates a survey object (Survey.Survey).
sender the survey creator object that fires the event
options.survey the survey object showing in the creator.
options.reason indicates what component of the creator requests the survey. There are several reason types: "designer" - survey for designer survey, "test" - survey for "Test Survey" tab and "conditionEditor", "defaultValueEditor", "restfulEditor" - surveys for different property editors.
- Type:
-
Event<(sender: CreatorBase<T>, options: any) => any, any>
- Implemented in:
-
CreatorBase
|
|
The event is fired when the survey creator runs the survey in the test mode.
sender the survey creator object that fires the event
options.survey the survey object showing in the "Test survey" tab.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
The method is called on after render translation item. You can modify the html element using this event
options.item - translation item
options.htmlElement - text area for editing
options.locale - the name of the editing locale
options.onDestroyCallback - a function callback that is called on remove htmlElement from DOM.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
- See also:
-
translation *
, showTranslationTab
|
|
The method is called when the translation from csv file is imported.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
- See also:
-
translation *
, showTranslationTab
|
|
The event is fired on uploading the files.
sender the survey creator object that fires the event
There are two properties in options:
files the Javascript File objects array
callback called on upload complete
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
- See also:
-
uploadFile
|
|
Use this event to show a check and custom error in property grid and adorners of the selected elements.
Returns true if selected element is null or there is no errors.
options.errors an array of error messages if any.
- Type:
-
Event<(sender: SurveyCreator, options: any) => any, any>
- Implemented in:
-
SurveyCreator
|
|
Set it to "single" to design surface in single page mode. By default value is "standard"
- Type:
-
"standard" | "single" readonly
- Implemented in:
-
SurveyCreator
|
|
A boolean property, false by default. Set it to true to deny editing.
- Type:
-
boolean writable
- Implemented in:
-
CreatorBase
|
|
Redo the latest undo operation. Returns true if it performes successful.
- Type:
-
() => void readonly
- Implemented in:
-
SurveyCreator
|
|
Call this method to render the Survey Creator.
- Type:
-
(element?: any, options?: any) => void
- Parameters:
-
element, type: any
, HtmlElement or html element id where survey creator will be rendered
options, type: any
, survey creator options. The following options are available: showJSONEditorTab, showTestSurveyTab, showEmbededSurveyTab,
showTranslationTab, showLogicTab, showOptions, generateValidJSON, isAutoSave, designerHeight.
- Implemented in:
-
SurveyCreator
|
|
Assign to this property a function that will be called on clicking the 'Save' button or on any change if isAutoSave equals true.
- Type:
-
any writable
- Implemented in:
-
SurveyCreator
- See also:
-
isAutoSave
|
|
If set to true (default value) the creator scrolls to a new element. A new element can be added from Toolbox or by copying.
- Type:
-
boolean readonly
- Implemented in:
-
SurveyCreator
|
|
Get or set the current selected object in the Creator. It can be a question, panel, page or survey itself.
- Type:
-
any writable
- Implemented in:
-
SurveyCreator
|
|
This callback is used internally for setting survey JSON text.
- Type:
-
(text: string) => void readonly
- Implemented in:
-
CreatorBase
|
|
The default value is "auto". It shows the language selector if there are more than two languages are using in the survey.
It shows only used languages in the survey.
Set this property to false to hide the default language selector in the Test Survey Tab.
Set it to true to show this selector even if there is only one language in the survey
Set it to all to show the selector with all available languages (30+)
- Type:
-
string | boolean readonly
- Implemented in:
-
CreatorBase
|
|
Make a "Survey Designer" tab active.
- Type:
-
() => void
- Implemented in:
-
SurveyCreator
|
|
Set it to true to show "JSON Editor" tab and to false to hide the tab
- Type:
-
boolean writable
- Implemented in:
-
CreatorBase
|
|
Set it to false hide the dropdown page selector in the page editor above the design surface
- Type:
-
boolean readonly
- Implemented in:
-
SurveyCreator
|
|
Show the creator dialog. The element can be a question, panel, page or survey. If property grid is used instead of dialog window (default behavior), then focus goes into the property grid.
- Type:
-
(element: Base, onClose: (isCanceled: boolean) => any) => void
- Parameters:
-
element, type: Base
, The survey element
onClose, type: (isCanceled: boolean) => any
- Implemented in:
-
SurveyCreator
- See also:
-
showModalElementEditor
|
|
You have to set this property to false via options on creating SurveyJS Creator to use popup editor and old property grid.
- Type:
-
boolean readonly
- Implemented in:
-
SurveyCreator
|
|
Make a "Embed Survey" tab active.
- Type:
-
() => void
- Implemented in:
-
SurveyCreator
|
|
Set it to true to show "Embed Survey" tab and to false to hide the tab
- Type:
-
boolean writable
- Implemented in:
-
CreatorBase
|
|
Set it to false to suppress an alert message about error on saving the survey into database.
- Type:
-
boolean readonly
- Implemented in:
-
CreatorBase
|
|
Returns the current show view name. The possible returns values are:
"designer", "editor", "test", "embed", "logic" and "translation".
- Type:
-
string readonly
- Implemented in:
-
SurveyCreator
- See also:
-
showDesigner *
, showTestSurvey *
, showJsonEditor *
, showLogicEditor *
, showTranslationEditor *
, showEmbedEditor
|
|
Set this property to false to hide the show invisible element checkbox in the Test Survey Tab
- Type:
-
boolean readonly
- Implemented in:
-
CreatorBase
|
|
Make a "JSON Editor" tab active.
- Type:
-
() => void
- Implemented in:
-
SurveyCreator
|
|
Set it to true to show "JSON Editor" tab and to false to hide the tab
- Type:
-
boolean writable
- Implemented in:
-
CreatorBase
|
|
Make a "Logic" tab active.
- Type:
-
() => void
- Implemented in:
-
SurveyCreator
|
|
Set it to true to show "Logic" tab and to false to hide the tab
- Type:
-
boolean writable
- Implemented in:
-
CreatorBase
|
|
Show the creator dialog. The element can be a question, panel, page or survey.
- Type:
-
(element: Base, onClose?: (isCanceled: boolean) => any) => void
- Parameters:
-
element, type: Base
, The survey element
onClose, type: (isCanceled: boolean) => any
, Callback function on closing dialog window. It has isCanceled boolean paratemer. It is true if a user cancel changes.
- Implemented in:
-
SurveyCreator
- See also:
-
onElementEditorClosed
|
|
You need to set this property to true if you want to show titles instead of names in pages editor and object selector.
- Type:
-
boolean readonly
- Implemented in:
-
CreatorBase
- See also:
-
onShowObjectDisplayName
|
|
Set it to true to show "Options" menu and to false to hide the menu
- Type:
-
boolean writable
- Implemented in:
-
SurveyCreator
|
|
Set this property to true if you want to show "page selector" in the toolabar instead of "pages editor"
- Type:
-
boolean readonly
- Implemented in:
-
CreatorBase
|
|
Set this property to false to hide the pages selector in the Test Survey Tab
- Type:
-
boolean readonly
- Implemented in:
-
CreatorBase
|
|
Set it to false to hide the pages toolbox on the top.
- Type:
-
ContainerLocation writable
- Implemented in:
-
SurveyCreator
|
|
Set it to false to completely hide the Property Grid on the right. It allows to edit the properties of the selected object (question/panel/page/survey).
- Type:
-
ContainerLocation writable
- Implemented in:
-
SurveyCreator
|
|
Set this property to false to hide the device simulator in the Test Survey Tab
- Type:
-
boolean readonly
- Implemented in:
-
CreatorBase
|
|
Set it to "always", "never" or "ifentered". The "ifentered" is the default value means show survey title only in case of user entered it.
- Type:
-
"ifentered" | "always" | "never" writable
- Implemented in:
-
SurveyCreator
|
|
Make a "Test Survey" tab active.
- Type:
-
() => void
- Implemented in:
-
SurveyCreator
|
|
Set it to true to show "Test Survey" tab and to false to hide the tab
- Type:
-
boolean writable
- Implemented in:
-
CreatorBase
|
|
You need to set this property to true if you want to show titles instead of names in expression editor.
- Type:
-
boolean readonly
- Implemented in:
-
CreatorBase
|
|
Set it to false to hide the question toolbox on the left.
- Type:
-
ContainerLocation writable
- Implemented in:
-
SurveyCreator
|
|
Make a "Translation" tab active.
- Type:
-
() => void
- Implemented in:
-
SurveyCreator
|
|
Set it to true to show "Translation" tab and to false to hide the tab
- Type:
-
boolean writable
- Implemented in:
-
CreatorBase
|
|
Returns the creator state. It may return empty string or "saving" and "saved".
- Type:
-
string readonly
- Implemented in:
-
SurveyCreator
|
|
The editing survey object (Survey.Survey)
- Type:
-
T readonly
- Implemented in:
-
CreatorBase
|
|
This property is assign to the survey.surveyId property on showing in the "Embed Survey" tab.
- Type:
-
string readonly
- Implemented in:
-
SurveyCreator
- See also:
-
showEmbededSurveyTab
|
|
This property is assign to the survey.surveyPostId property on showing in the "Embed Survey" tab.
- Type:
-
string readonly
- Implemented in:
-
SurveyCreator
- See also:
-
showEmbededSurveyTab
|
|
The Survey JSON as a text. Use it to get Survey JSON or change it.
- Type:
-
string writable
- Implemented in:
-
CreatorBase
- See also:
-
JSON
|
|
The list of toolbar items. You may add/remove/replace them.
- Type:
-
ObservableArray<IActionBarItem> readonly
- Implemented in:
-
SurveyCreator
- See also:
-
IActionBarItem
|
|
Toolbox object. Contains information about Question toolbox items.
- Type:
-
QuestionToolbox readonly
- Implemented in:
-
SurveyCreator
- See also:
-
QuestionToolbox
|
|
Return the translation mode object.
- Type:
-
Translation writable
- Implemented in:
-
SurveyCreator
- See also:
-
showTranslationTab
|
|
Undo the latest user operation. Returns true if it performes successful.
- Type:
-
() => void readonly
- Implemented in:
-
SurveyCreator
|
|
Use this method to force update this element in editor.
- Type:
-
(element: Question) => void
- Parameters:
-
element, type: Question
, Survey.Question is element to update
- Implemented in:
-
SurveyCreator
|
|
Upload the files on a server
- Type:
-
(files: File[], uploadingCallback: (status: string, data: any) => any) => void
- Parameters:
-
files, type: File[]
, files to upload
uploadingCallback, type: (status: string, data: any) => any
, a call back function to get the status on uploading the file and operation result - URI of the uploaded file
- Implemented in:
-
SurveyCreator
|
|
You need to set this property to true if you want to use tabs instead of accordion in the popup element's editor.
- Type:
-
boolean readonly
- Implemented in:
-
CreatorBase
|
|
Check for errors in property grid and adorners of the selected elements.
Returns true if selected element is null or there is no errors.
- Type:
-
() => boolean
- Implemented in:
-
SurveyCreator
|