Survey Creator Toolbox Customization
The Toolbox contains available question and panel types. Click one of these survey elements or drag and drop it onto the design surface to add the element to the survey. This demo shows how to customize the Toolbox and its items.
Full and Compact Modes
The Toolbox supports full and compact modes. In compact mode, element names are hidden and become visible only when users move the mouse pointer over the element icon.
The Toolbox switches between the modes automatically based on the width of Survey Creator. Specify the forceCompact
property if you want the Toolbox to always use a specific mode. This demo disables the forceCompact
property to always show the Toolbox in full mode.
Limit Available Question and Panel Types
All available question and panel types are listed in the getType()
method description. If you need to show only a part of these types, specify them in the Survey Creator's questionTypes
array. In this demo, the array limits available question types to Text, Checkbox, Radiogroup, and Dropdown.
Customize Predefined Toolbox Items
To customize a predefined Toolbox item, pass its type as an argument to the getItemByName(itemName)
method. This method returns the item's configuration object. Change the properties of this object to customize the Toolbox item. For example, this demo shows how to change the title
for the Text question, the iconName
for the Checkbox question, and the json
schema for multiple questions.
Add a Custom Toolbox Item
Since the Toolbox is meant to contain question and panel types, to add a new element, you need to create a custom question or panel type. Refer to the following help topic for detailed instructions: