Customize Property Editors

Edit in →

The Property Grid allows you to register custom property editors and use them for built-in and custom properties. The editors are based on question types from SurveyJS Form Library. For instance, this example shows how to use the Single-Line Input question type to implement a text editor limited to 15 characters. This editor is used for the Question name and Short name properties.

Each property editor type is a configuration object that specifies at least two functions:

  • getJSON: Function
    Returns the JSON configuration object of an underlying SurveyJS Form Library question. This object can include any properties supported by that question.

  • fit: Function
    Specifies one or multiple conditions under which the property editor applies. Returns true if the editor can be used for the current property or false otherwise. In this demo, a custom editor applies when the property's type is "shorttext".

To implement a custom editor, define an object with the getJSON and fit functions and register it in PropertyGridEditorCollection. The custom editor will be used for the properties that satisfy the fit conditions. Refer to the Code tab for a code example.

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.