Create Custom Adorners

Edit in →

Adorners are interactive design-surface controls placed within a question area. Adorners allow users to quickly execute the most common actions: duplicate a question, mark a question as required, or delete it. This demo shows how to customize built-in adorners and create custom adorners. Read more...

Sorry, we can't retrieve the data from server. Please comeback later.

Adorners are interactive design-surface controls placed within a question area. Adorners allow users to quickly execute the most common actions: duplicate a question, mark a question as required, or delete it. This demo shows how to customize built-in adorners and create custom adorners.

Create a Button Adorner

A button adorner executes a simple action on click. To create a button adorner, follow the steps below:

  1. Handle the onDefineElementMenuItems event.
    This event is raised when Survey Creator renders adorners on the design surface.

  2. Create an Action instance.
    Pass an IAction configuration object to the Action constructor. This object describes an action item rendered as a button adorner.

  3. Add the Action instance to the options.items array.

This demo shows how to create a custom Read-Only button adorner. Refer to the code listing for more information.

Create a Drop-Down Adorner

A drop-down adorner opens a drop-down menu on click. The following instructions describe how to create a drop-down adorner:

  1. Handle the onDefineElementMenuItems event.

  2. Create an Action instance.
    Drop-down adorners have a dedicated createDropdownActionModel() helper function that generates Action instances based on IAction and IActionDropdownPopupOptions configuration objects. Import this function from survey-core and pass IAction and IActionDropdownPopupOptions objects to it.

  3. Add the Action instance to the options.items array.

In this demo, a custom Sort Order drop-down adorner lets users specify the order of items in choice-based questions. For details about implementation, view code listings for Angular, React, Vue, jQuery, or Knockout.

Your cookie settings

We use cookies on our site to make your browsing experience more convenient and personal. In some cases, they are essential to making the site work properly. By clicking "Accept All", you consent to the use of all cookies in accordance with our Terms of Use & Privacy Statement. However, you may visit "Cookie settings" to provide a controlled consent.

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.