Documentation Docs
Documentation Docs

CreatorBase

Base class for Survey Creator.

activeTab property

Get/set the active tab. The following values are available: "designer", "editor", "test", "embed", "logic" and "translation". Please note, not all tabs are visible.

Type:
string writable
Implemented in:
CreatorBase
allowChangeThemeInPreview property

Specifies whether users can switch between UI themes in the Preview tab.

Default value: true

View Demo

Type:
boolean readonly
Implemented in:
CreatorBase
allowEditExpressionsInTextEditor property

Specifies whether users can edit expressions in the Logic tab as plain text.

If you set this property to false, users can only use UI elements to edit logical expressions.

Default value: true

Type:
boolean readonly
Implemented in:
CreatorBase
See also:
showLogicTab
allowEditSurveyTitle property

Obsolete. Use the showSurveyTitle property instead.

Type:
boolean writable
Implemented in:
CreatorBase
allowModifyPages property

Specifies whether users can add, edit, and delete survey pages.

Default value: true

Type:
boolean writable
Implemented in:
CreatorBase
autoSaveDelay property

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:
CreatorBase
See also:
isAutoSave
changeText method

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

Open file chooser dialog

Type:
(input: any, onFilesChosen: (files: {}) => void) => void
Parameters:
input, type: any ,

file input element

onFilesChosen, type: (files: {}) => void ,

a call back function to process chosen files

Implemented in:
CreatorBase
collapseAllPropertyGridCategories method

Expand all property editor tabs (categories) in properties panel/grid

Type:
() => void
Implemented in:
CreatorBase
See also:
collapsePropertyGridCategory * , expandPropertyGridCategory * , expandAllPropertyGridCategories
collapsePropertyGridCategory method

Collapse certain property editor tab (category) in properties panel/grid name - tab category name

Type:
(name: string) => void
Parameters:
name, type: string
Implemented in:
CreatorBase
See also:
collapseAllPropertyGridCategories * , expandPropertyGridCategory * , expandAllPropertyGridCategories
copyPage method

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
Parameters:
page, type: PageModel ,

A copied Survey.Page

Implemented in:
CreatorBase
deleteCurrentElement method

Delete a currently selected element in the survey. It can be a question, a panel or a page.

Type:
() => void
Implemented in:
CreatorBase
deleteElement method

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

Deletes all custom translation strings for the passed locale from Survey Creator and from the generated survey JSON schema.

Type:
(locale: string) => void
Parameters:
locale, type: string ,

A locale code (for example, "en").

Implemented in:
CreatorBase
expandAllPropertyGridCategories method

Expand all property editor tabs (categories) in properties panel/grid

Type:
() => void
Implemented in:
CreatorBase
See also:
collapsePropertyGridCategory * , collapseAllPropertyGridCategories * , expandPropertyGridCategory
expandPropertyGridCategory method

Expand certain property editor tab (category) in properties panel/grid name - tab category name

Type:
(name: string) => void
Parameters:
name, type: string
Implemented in:
CreatorBase
See also:
collapsePropertyGridCategory * , collapseAllPropertyGridCategories * , expandAllPropertyGridCategories
fastCopyQuestion method

Copy a question to the active page

Type:
(question: Base) => IElement
Parameters:
question, type: Base ,

A copied Survey.Question

Implemented in:
CreatorBase
getLocString method

Returns the localized string by its id

Type:
(str: string) => string
Parameters:
str, type: string ,

the string id.

Implemented in:
CreatorBase
getSurveyJSONTextCallback property

This callback is used internally for providing survey JSON text.

Type:
() => { text: string; isModified: boolean; } readonly
Implemented in:
CreatorBase
haveCommercialLicense property

Removes the Free Trial bar.

Default value: false

You can enable this property only if you have a Survey Creator commercial license. It is illegal to enable this property without a license.

Type:
boolean readonly
Implemented in:
CreatorBase
inplaceEditForValues property

You need to set this property to true if you want to inplace edit item values instead of texts.

Type:
boolean readonly
Implemented in:
CreatorBase
isAutoSave property

Specifies whether to call the saveSurveyFunc each time survey settings are changed.

Default value: false

Type:
boolean readonly
Implemented in:
CreatorBase
isInitialSurveyEmpty property

Returns true if initial survey was empty. It was not set via JSON property and default new survey is empty as well.

Type:
boolean readonly
Implemented in:
CreatorBase
isPreviewShowing property

Return true if Preview tab is currently active

Type:
boolean readonly
Implemented in:
CreatorBase
isProcessingUndoRedo property

Returns true if Creator is currently doing undo or redo opertaions

Type:
boolean readonly
Implemented in:
CreatorBase
isRTL property

Specifies whether to enable support for right-to-left languages.

Default value: false

Type:
boolean writable
Implemented in:
CreatorBase
JSON property

The Survey JSON. Use it to get Survey JSON or change it.

Type:
any writable
Implemented in:
CreatorBase
See also:
text
locale property

Gets or sets the survey locale. The default value it is empty, this means the 'en' locale is used. You can set it to 'de' - German, 'fr' - French and so on.

Type:
string writable
Implemented in:
CreatorBase
makeNewViewActive method

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", "logic" and "translation".

Implemented in:
CreatorBase
maximumChoicesCount property

Limits the number of choices that users can add to Checkbox, Dropdown, and Radiogroup questions.

Default value: 0 (unlimited, taken from settings.propertyGrid.maximumChoicesCount)

Type:
number readonly
Implemented in:
CreatorBase
maximumColumnsCount property

Limits the number of columns that users can add to Matrix, Matrix Dynamic, and Matrix Dropdown questions.

Default value: 0 (unlimited, taken from settings.propertyGrid.maximumColumnsCount)

Type:
number readonly
Implemented in:
CreatorBase
maximumRateValues property

Limits the number of rate value that users can add to Rating questions.

Default value: 0 (unlimited, taken from settings.propertyGrid.maximumRateValues)

Type:
number readonly
Implemented in:
CreatorBase
maximumRowsCount property

Limits the number of rows that users can add to Matrix and Matrix Dropdown questions.

Default value: 0 (unlimited, taken from settings.propertyGrid.maximumRowsCount)

Type:
number readonly
Implemented in:
CreatorBase
maxLogicItemsInCondition property

Limits the number of items in a logical expression.

Default value: -1 (unlimited)

Type:
number readonly
Implemented in:
CreatorBase
maxVisibleChoices property

Limits the number of visible choices. Users can click "Show more" to view hidden choices.

Set this property to -1 if you do not want to hide any choices.

Default value: 10

Type:
number readonly
Implemented in:
CreatorBase
notify method

This function triggers user notification (via the alert() function if no onNotify event handler added).

Type:
(msg: string, type?: "info" | "error") => void
Parameters:
msg, type: string
type, type: "info" | "error"
Implemented in:
CreatorBase
See also:
onNotify
onActiveTabChanged event

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
  • options.model the instance of the model of the new active tab
Type:
CreatorEvent
Implemented in:
CreatorBase
onActiveTabChanging event

The event is called when creator is going to change the active tab.

  • sender the survey creator object that fires the event
  • options.tabName the name of new active tab
Type:
CreatorEvent
Implemented in:
CreatorBase
onAfterRedo event

The event is called after redo happens.

  • options.state is an undo/redo item.
Type:
CreatorEvent
Implemented in:
CreatorBase
onAfterUndo event

The event is called after undo happens.

  • options.state is an undo/redo item.
Type:
CreatorEvent
Implemented in:
CreatorBase
onBeforeRedo event

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:
CreatorEvent
Implemented in:
CreatorBase
onBeforeUndo event

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:
CreatorEvent
Implemented in:
CreatorBase
onCanDeleteItem event

The event is called before rendering a delete button in the Property Grid or in Question Editor.

Type:
CreatorEvent
Implemented in:
CreatorBase
See also:
onCollectionItemAllowOperations
onCollectionItemAllowOperations event

The event is called before rendering a collection item in a property editor. For example: a column in a column editor, or an item in Choices and so on. Use this event to prevent a collection item from being edited or removed from a collection.

  • 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 a collection where a target item is located. It is can be Columns in Matrices or Choices in Dropdown question and so on.
  • options.item a target collection item
  • options.allowDelete a boolean value. It is true by default. Set it false to prevent an item from being removed from the collection
  • options.allowAdd a boolean value. It is true by default. Set it false to prevent an item from being added to the collection
  • options.allowEdit a boolean value. It is true by default. Set it false to disable editing.
Type:
CreatorEvent
Implemented in:
CreatorBase
onCollectionItemDeleting event

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.

Type:
CreatorEvent
Implemented in:
CreatorBase
See also:
onCollectionItemAllowOperations
onConditionGetTitle event

Use this event to modify the title in a condition editor. The title is changing during editing. In case of empty or incorrect expression it tells that expression is incorrect

  • sender the survey creator object that fires the event.
  • options.expression the current expression. If the expression is empty or incorrect then the value is empty.
  • options.title the default value of the title. You can change the default value.
Type:
CreatorEvent
Implemented in:
CreatorBase
onConditionQuestionsGetList event

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
  • options.sortOrder "asc" (default) | "none". Change it to "none", if you don't want to sort your condition list
Type:
CreatorEvent
Implemented in:
CreatorBase
onDefineElementMenuItems event

Use this event to add/remove/modify the element (question/panel) menu items.

  • sender the survey creator object that fires the event
  • options.obj the survey object which property is edited in the Property Editor.
  • options.items the list of menu items. It has two required fields: text and onClick: function(obj: Survey.Base) and optional name field.
Type:
CreatorEvent
Implemented in:
CreatorBase
See also:
onElementAllowOperations
onDesignerSurveyCreated event

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:
CreatorEvent
Implemented in:
CreatorBase
onDragDropAllow event

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:
CreatorEvent
Implemented in:
CreatorBase
onDragEnd event

An event that is raised when users finish dragging a survey element within the design surface.

Parameters:

  • sender: CreatorBase
    A Survey Creator instance that raised the event.
  • options.draggedElement: any
    A survey element that was dragged.
  • options.fromElement: any
    A survey element from which draggedElement was dragged.
  • options.toElement: any
    A survey element to which draggedElement was dragged.
Type:
Event<() => any, any, any>
Implemented in:
CreatorBase
onDragStart event

An event that is raised when users start to drag a survey element within the design surface.

Parameters:

  • sender: CreatorBase
    A Survey Creator instance that raised the event.
  • options.draggedElement: any
    A survey element being dragged.
  • options.fromElement: any
    A survey element from which draggedElement is being dragged.
  • options.toElement: any
    A survey element to which draggedElement is being dragged.
Type:
Event<() => any, any, any>
Implemented in:
CreatorBase
See also:
onDragEnd
onElementAllowOperations event

Use this event to disable user interactions with a question or panel on the design surface.

The event handler accepts the following arguments:

  • sender- A Survey Creator instance that raised the event.
  • options.obj - A survey element instance (question or panel) for which you can disable user interactions.
  • options.allowAddToToolbox - Allows users to save the current survey element configuration in the Toolbox.
  • options.allowChangeRequired - Allows users to make the survey element required.
  • options.allowChangeType - Allows users to change the survey element type.
  • options.allowChangeInputType - Allows users to change the inputType property of Single-Line Input questions.
  • options.allowCopy - Allows users to duplicate the survey element.
  • options.allowDelete - Allows users to delete the survey element.
  • options.allowDragging - Allows users to drag and drop the survey element.
  • options.allowEdit - Allows users to edit survey element properties on the design surface. If you disable this property, users can edit the properties only in the Property Grid.

To disable a user interaction, set the correponding allow... property to false.

Type:
CreatorEvent
Implemented in:
CreatorBase
onElementDeleting event

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:
CreatorEvent
Implemented in:
CreatorBase
onGenerateNewName event

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:
CreatorEvent
Implemented in:
CreatorBase
onGetObjectDisplayName event

An event that is raised when Survey Creator obtains a survey element name to display it in the UI.

Handle this event to replace survey element names in the UI with custom display texts. If you only want to replace the names with survey element titles, enable the showObjectTitles property instead of handling this event.

The event handler accepts the following arguments:

  • sender- A Survey Creator instance that raised the event.
  • options.obj - The instance of a survey element (survey, page, question, or panel) whose name has been requested.
  • options.area - A Survey Creator UI element that requests the display name.
    • "page-selector" - Page selector on the design surface
    • "condition-editor" - Condition pop-up window or drop-down menus that allow users to select questions in the Logic tab
    • "logic-tab:question-filter" - Question filter in the Logic tab
    • "logic-tab:question-selector" - Question selector on editing actions in the Logic tab
    • "preview-tab:page-list" - Page list in the Preview tab
    • "preview-tab:selected-page" - Selected page name in the Preview tab
    • "property-grid:property-editor" - Property editors in the Property Grid
    • "property-grid-header:element-list" - Survey element list in the header of the Property Grid
    • "property-grid-header:selected-element" - Selected survey element in the header of the Property Grid
    • "translation-tab" - Translation tab
  • options.displayName - Modify this property to set a custom display text for the survey element.
  • options.reason - Obsolete. Use the options.area property instead.
    • "condition" - Use the "condition-editor" value of options.area instead.
    • "survey-tester" - Use the "preview-tab:page-list" value of options.area instead.
    • "survey-tester-selected" - Use the "preview-tab:selected-page" value of options.area instead.
    • "survey-translation" - Use the "translation-tab" value of options.area instead.
    • "property-editor" - Use the "property-grid:property-editor" value of options.area instead.
    • "property-grid" - Use the "property-grid-header:element-list" value of options.area instead.
    • "property-grid-title" - Use the "property-grid-header:selected-element" value of options.area instead.
Type:
CreatorEvent
Implemented in:
CreatorBase
onGetPropertyReadOnly event

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.
  • 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:
CreatorEvent
Implemented in:
CreatorBase
onHtmlToMarkdown event

This event is raised after a user has edited a text value on the design surface. This value may include HTML markup. You can handle the onHtmlToMarkdown event to convert the HTML markup to Markdown.

The event handler accepts the following arguments:

  • sender - A Survey Creator instance that raised the event.
  • options.element - The instance of a survey element (survey, page, panel, question) that the user configures.
  • options.name - The name of a property whose value has been edited.
  • options.html - HTML content. Pass this field's value to an HTML-to-Markdown converter.
  • options.text - A text string that may contain Markdown. Assign the result of the HTML-to-Markdown conversion to this field.
Type:
CreatorEvent
Implemented in:
CreatorBase
onItemValueAdded event

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:
CreatorEvent
Implemented in:
CreatorBase
onLogicItemDisplayText event

Use this event to modify the display text of a logic item in the Logic tab.

The event handler accepts the following arguments:

  • sender - A Survey Creator instance that raised the event.
  • options.expression - A logical expression associated with the logic item.
  • options.expressionText - The same expression in a user-friendly format. It may contain question titles instead of question names.
  • options.logicItem - A logic item object. Contains an array of actions and other properties.
  • options.text - The expression and actions in a user-friendly format. Redefine this property if you want to change the display text.
Type:
CreatorEvent
Implemented in:
CreatorBase
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:
CreatorEvent
Implemented in:
CreatorBase
onModified event

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"

  • options.type: "JSON_EDITOR"

Type:
CreatorEvent
Implemented in:
CreatorBase
onNotify event

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:
CreatorEvent
Implemented in:
CreatorBase
onOpenFileChooser event

The event is fired then one need to choose files.

  • sender - the survey creator object that fires the event
  • options.input - file input HTML element
  • options.callback - need to be called after files has been chosen
Type:
CreatorEvent
Implemented in:
CreatorBase
See also:
uploadFiles
onPageAdded event

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:
CreatorEvent
Implemented in:
CreatorBase
onPageAdding event

An event that is raised before a new page is added to the survey.

Parameters:

  • sender: CreatorBase
    A Survey Creator instance that raised the event.
  • options.page: PageModel
    An added page.
  • options.allow: Boolean
    Set this property to false if you do not want to add the page.
Type:
CreatorEvent
Implemented in:
CreatorBase
onPanelAdded event

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:
CreatorEvent
Implemented in:
CreatorBase
onPreviewSurveyCreated event

The event is fired when the survey creator creates survey in Preview tab for testing.

  • sender the survey creator object that fires the event
  • options.survey the survey object showing in the "Preview" tab.
Type:
CreatorEvent
Implemented in:
CreatorBase
onPropertyEditorCreated event

The event is called after a property editor (in fact a survey question) has been created and all it's properties have been assign. You can use this event to modify the property editor properties or set event handlers to customize it's behavior

  • options.obj the survey object that is currently editing in the property grid
  • options.property the property that the current property editor is editing
  • options.editor the property editor. In fact it is a survey question. We are using a heavily customizable survey as a property grid in Creator V2. It means that every property editor is a question.
Type:
CreatorEvent
Implemented in:
CreatorBase
onPropertyEditorUpdateTitleActions event

The event is called after a property editor setups its title actions. You can use this event to modify the property editor title actions

  • options.obj the survey object that is currently editing in the property grid
  • options.property the property that the current property editor is editing
  • options.editor the property editor. In fact it is a survey question. We are using a heavily customizable survey as a property grid in Creator V2. It means that every property editor is a question.
  • options.titleActions the list of title actions.
Type:
CreatorEvent
Implemented in:
CreatorBase
onPropertyGridShowModal event

An event that is raised before Survey Creator displays a pop-up window called from the Property Grid. This window allows users to edit choices, conditions, and so on.

Use this event to customize the pop-up window, for example, add custom action buttons.

Parameters:

  • sender - A Survey Creator instance that raised the event.
  • options.obj - An instance of a survey element (question or panel) that users are configuring in the Property Grid.
  • options.property- A JsonObjectProperty object with metadata about the property being edited.
  • options.editor - A property editor. It is an object of the Question type because the Property Grid is built upon a regular survey.
  • options.popupEditor - An editor inside the pop-up window.
  • options.popupModel - A PopupBaseViewModel object that describes the pop-up window model. Use options.popupModel.footerToolbar to access the actions at the bottom of the window.
Type:
CreatorEvent
Implemented in:
CreatorBase
onPropertyGridSurveyCreated event

The event is called after a survey that represents the Property Grid is created and all its questions (property editors) are setup. You can use this event to modify this survey to change the property grid behavior

  • options.obj the survey object that is currently editing in the property grid
  • options.survey the property grid survey
Type:
CreatorEvent
Implemented in:
CreatorBase
onPropertyValidationCustomError event

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:
CreatorEvent
Implemented in:
CreatorBase
See also:
onPropertyValueChanging
onPropertyValueChanging event

An event that is raised each time a user modifies a survey object property. Use this event to validate or correct a property value while the user enters it.

The event handler accepts the following arguments:

  • sender- A Survey Creator instance that raised the event.
  • options.obj - A survey object instance (question or panel) whose property is being edited.
  • options.propertyName - The name of the property.
  • options.value - An old property value.
  • options.newValue - A new property value. Specify this field if you want to override the entered value.
Type:
CreatorEvent
Implemented in:
CreatorBase
See also:
onPropertyValidationCustomError * , onSurveyPropertyValueChanged
onQuestionAdded event

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.
  • options.reason how question has been added via UI: ADDED_FROM_TOOLBOX, ADDED_FROM_PAGEBUTTON, ELEMENT_COPIED.
Type:
CreatorEvent
Implemented in:
CreatorBase
onSelectedElementChanged event

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:
CreatorEvent
Implemented in:
CreatorBase
onSelectedElementChanging event

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:
CreatorEvent
Implemented in:
CreatorBase
onSetPropertyEditorOptions event

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.allowBatchEdit a boolean property, true by default. Set it false to hide the "Edit" button for the "choices" property.
  • options.editorOptions.itemsEntryType a string property, 'form' by default. Set it 'fast' to show "Manual Entry" tab for "choices" property by default.
Type:
CreatorEvent
Implemented in:
CreatorBase
onShowingProperty event

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.
  • 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.

Example: Hide a category in the Properties Grid

Type:
CreatorEvent
Implemented in:
CreatorBase
onSurveyInstanceCreated event

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 "Preview" tab and "conditionEditor", "defaultValueEditor", "restfulEditor" - surveys for different property editors.
Type:
CreatorEvent
Implemented in:
CreatorBase
onSurveyPropertyValueChanged event

An event that is raised after a property in a survey object has changed.

  • sender- A Survey Creator instance that raised the event.
  • options.obj - A survey object instance (question or panel) whose property has changed.
  • options.propertyName - The name of the property.
  • options.value - A new property value.
Type:
CreatorEvent
Implemented in:
CreatorBase
See also:
onPropertyValidationCustomError * , onPropertyValueChanging
onTestSurveyCreated event

Obsolete. Please use onPreviewSurveyCreated event.

Type:
CreatorEvent
Implemented in:
CreatorBase
See also:
onPreviewSurveyCreated
onTranslationExportItem event

Use this event to modify a translated string before it is exported to CSV.

The event handler accepts the following arguments:

  • sender - A Survey Creator instance that raised the event.
  • options.obj - A survey object instance (survey, page, panel, question) whose string translations are being exported to CSV.
  • options.locale - The current locale identifier ("en", "de", etc.). Contains an empty string if the default locale is used.
  • options.name - A full name of the translated string. It is composed of names of all parent elements, for example: "mySurvey.page1.question2.title".
  • options.locString - A LocalizableString instance. Call the options.locString.getLocaleText(locale) method if you need to get a text string for a specific locale.
  • options.text - A text string to be exported. The string is taken from the current locale. Redefine this property if you want to export a different string.
Type:
CreatorEvent
Implemented in:
CreatorBase
onTranslationImported event

The event is called when the translation from csv file is imported.

Type:
CreatorEvent
Implemented in:
CreatorBase
See also:
translation * , showTranslationTab
onTranslationImportItem event

Use this event to modify the imported localizable text. To block importing a particular localization text, set the options.text into undefined.

The event handler accepts the following arguments:

  • sender - A Survey Creator instance that raised the event.
  • options.locale - the locale name, like 'en', 'de' and so on.
  • options.name - The full name of the localizable string, it can be: "survey.page1.question2.title"
  • options.text - The imported text for the locale for this item. Set it to undefined or empty string to block importing for this item
Type:
CreatorEvent
Implemented in:
CreatorBase
onTranslationItemChanging event

An event that is raised before a string translation is changed. Use this event to override a new translation value.

Parameters:

  • sender: CreatorBase
    A Survey Creator instance that raised the event.
  • options.obj: any
    A survey object instance (survey, page, panel, question) whose string translation is being changed.
  • options.locale: String
    The current locale identifier ("en", "de", etc.). Contains an empty string if the default locale is used.
  • options.locString: LocalizableString
    An object that you can use to manipulate a localization string. Call the options.locString.getLocaleText(locale) method if you need to get a text string for a specific locale.
  • options.newText: String
    A new value for the string translation.

Refer to the following help topics for more information on localization:

Type:
CreatorEvent
Implemented in:
CreatorBase
onTranslationLocaleInitiallySelected event

Use this event to define is the locale initially selected (default value) and ready for translaion or it is unselected.

The event handler accepts the following arguments:

  • sender - A Survey Creator instance that raised the event.
  • options.locale - the locale name, like 'en', 'de' and so on.
  • options.isSelected - it is true by default. Set it to false to make the translation unselected.
Type:
CreatorEvent
Implemented in:
CreatorBase
onTranslationStringVisibility event

Use this event to modify the list of the strings available in the Translation tab.

The event handler accepts the following arguments:

  • sender - A Survey Creator instance that raised the event.
  • options.obj - A survey object instance (survey, page, panel, question) whose string translations are being edited in the Translation tab.
  • options.propertyName - The name of a property being translated.
  • options.visible - A Boolean value that specifies the property visibility. Set it to false to hide the property.
Type:
CreatorEvent
Implemented in:
CreatorBase
onUploadFile event

The event is fired on uploading the files.

  • sender - the survey creator object that fires the event
  • options.files - the Javascript File objects array
  • options.callback(status, imageLink) - called on upload complete
Type:
CreatorEvent
Implemented in:
CreatorBase
See also:
uploadFiles
pageEditMode property

Contains the value of the pageEditMode property specified in the constructor.

Type:
"standard" | "single" | "bypage" writable
Implemented in:
CreatorBase
pageHoverDelay property

Set delay for page hover

Type:
number readonly
Implemented in:
CreatorBase
previewOrientation property

Specifies the orientation of the selected device in the Preview tab.

Possible values:

  • "landscape" (default)
  • "portrait"
Type:
"landscape" | "portrait" readonly
Implemented in:
CreatorBase
readOnly property

Enables the read-only mode. If you set this property to true, users cannot change the initial survey configuration.

Default value: false

Type:
boolean writable
Implemented in:
CreatorBase
redo method

This method performs redo uperation if possible.

Type:
() => void
Implemented in:
CreatorBase
saveSurveyFunc property

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:
CreatorBase
See also:
isAutoSave
selectedElement property

Get or set the current selected object in the Creator. It can be a question, panel, page or survey itself.

Type:
Base writable
Implemented in:
CreatorBase
setSurveyJSONTextCallback property

This callback is used internally for setting survey JSON text.

Type:
(text: string) => void readonly
Implemented in:
CreatorBase
showDefaultLanguageInPreviewTab property

Specifies whether the Preview tab displays the language selector.

Accepted values:

  • "auto" (default)
    Display the language selector only if the survey is translated into more than one language.

  • true
    Always display the language selector regardless of how many languages are used in the survey.

  • false
    Never display the language selector.

  • "all"
    Always display the language selector with all supported languages.

See also: Localization & Globalization

Type:
string | boolean writable
Implemented in:
CreatorBase
showDefaultLanguageInTestSurveyTab property

Obsolete. Use the showDefaultLanguageInPreviewTab property instead.

Type:
string | boolean readonly
Implemented in:
CreatorBase
showDesignerTab property

Specifies whether to display the Designer tab.

Default value: true

Type:
boolean readonly
Implemented in:
CreatorBase
showEmbeddedSurveyTab property

Specifies whether to display the Embed Survey tab.

Default value: false

Type:
boolean readonly
Implemented in:
CreatorBase
showErrorOnFailedSave property

Specifies whether to show an error message if a survey is not saved in the database.

Default value: true

Type:
boolean readonly
Implemented in:
CreatorBase
showingViewName property

Returns the current show view name. The possible returns values are: "designer", "editor", "test", "embed", "logic" and "translation".

Type:
string readonly
Implemented in:
CreatorBase
See also:
showDesigner * , showPreview * , showJsonEditor * , showLogicEditor * , showTranslationEditor * , showEmbedEditor
showInvisibleElementsInPreviewTab property

Specifies whether the Preview tab displays a checkbox that allows users to show or hide invisible survey elements.

Default value: true

Type:
boolean writable
Implemented in:
CreatorBase
showInvisibleElementsInTestSurveyTab property

Obsolete. Use the showInvisibleElementsInPreviewTab property instead.

Type:
boolean readonly
Implemented in:
CreatorBase
showJSONEditorTab property

Specifies whether to display the JSON Editor tab.

Default value: true

Type:
boolean readonly
Implemented in:
CreatorBase
showLogicTab property

Specifies whether to display the Logic tab.

Default value: false

Type:
boolean readonly
Implemented in:
CreatorBase
showObjectTitles property

Specifies whether UI elements display survey, page, and question titles instead of their names.

Default value: false

Type:
boolean readonly
Implemented in:
CreatorBase
See also:
onGetObjectDisplayName
showPageSelectorInToolbar property

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

Specifies whether to show the page selector at the bottom of the Preview tab.

Default value: true

Type:
boolean writable
Implemented in:
CreatorBase
showPagesInTestSurveyTab property

Obsolete. Use the showPagesInPreviewTab property instead.

Type:
boolean readonly
Implemented in:
CreatorBase
showPreview method

Show Preview tab

Type:
() => void
Implemented in:
CreatorBase
showPreviewTab property

Specifies whether to display the Preview tab.

Default value: true

Type:
boolean writable
Implemented in:
CreatorBase
showSidebar property

Set this this property grid false to hide the property grid.

Type:
boolean writable
Implemented in:
CreatorBase
showSimulatorInPreviewTab property

Specifies whether the Preview tab displays the Device button that allows users to preview the survey on different device types.

Default value: true

Type:
boolean writable
Implemented in:
CreatorBase
showSimulatorInTestSurveyTab property

Obsolete. Use the showSimulatorInPreviewTab property instead.

Type:
boolean readonly
Implemented in:
CreatorBase
showSurveyTitle property

Specifies whether users can see and edit the survey title and related survey properties.

Default value: true

Type:
boolean writable
Implemented in:
CreatorBase
showTestSurveyTab property

Obsolete. Please use showPreviewTab property

Type:
boolean readonly
Implemented in:
CreatorBase
See also:
showPreviewTab
showThemeTab property

Specifies whether to display the Theme tab.

Default value: false

Type:
boolean readonly
Implemented in:
CreatorBase
showTitlesInExpressions property

Specifies whether to display question titles instead of names when users edit logical expressions.

Default value: false

Type:
boolean readonly
Implemented in:
CreatorBase
showTranslationTab property

Specifies whether to display the Translation tab.

Default value: false

Type:
boolean readonly
Implemented in:
CreatorBase
sidebarLocation property

Specifies the position of the sidebar that displays Property Grid.

Possible values:

  • "right" (default) - Displays the sidebar on the right side of the design surface.
  • "left" - Displays the sidebar on the left side of the design surface.
Type:
"left" | "right" readonly
Implemented in:
CreatorBase
See also:
toolboxLocation
startUndoRedoTransaction method

This method starts undo/redo transaction: all changes will be stored as one undo/redo item.

Type:
(name?: string) => void
Parameters:
name, type: string
Implemented in:
CreatorBase
state property

Returns the creator state. It may return empty string or "saving" and "saved".

Type:
string readonly
Implemented in:
CreatorBase
stopUndoRedoTransaction method

This method stops undo/redo transaction.

Type:
() => void
Implemented in:
CreatorBase
survey property

The editing survey object (Survey.Survey)

Type:
SurveyModel readonly
Implemented in:
CreatorBase
text property

The Survey JSON as a text. Use it to get Survey JSON or change it.

Type:
string writable
Implemented in:
CreatorBase
See also:
JSON
themeForPreview property

A UI theme used to display the survey in the Preview tab.

Accepted values: "modern", "default", "defaultV2"

Default value: "defaultV2"

Type:
string readonly
Implemented in:
CreatorBase
toolboxLocation property

Specifies Toolbox location.

Possible values:

  • "left" (default) - Displays Toolbox on the left side of the design surface.
  • "right" - Displays Toolbox on the right side of the design surface.
  • "sidebar" - Displays Toolbox as an overlay on top of Property Grid. Use the sidebarLocation property to specify Property Grid position.
Type:
toolboxLocationType readonly
Implemented in:
CreatorBase
undo method

This method performs undo uperation if possible.

Type:
() => void
Implemented in:
CreatorBase
uploadFiles method

Upload the files on a server

Type:
(files: {}, question: Question, uploadingCallback: (status: string, data: any) => any) => void
Parameters:
files, type: {} ,

files to upload

question, type: Question
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:
CreatorBase
validateSelectedElement method

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:
CreatorBase

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

Why we use cookies.

This site uses cookies to make your browsing experience more convenient and personal. Cookies store useful information on your computer to help us improve the efficiency and relevance of our site for you. In some cases, they are essential to making the site work properly. By accessing this site, you consent to the use of cookies.

For more information, refer to DevSoft Baltic’ privacy policy and cookie policy.

Your renewal subscription expires soon.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.

Your renewal subscription has expired.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.