Add Custom Properties to the Property Grid

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

Survey elements include a number of built-in properties that cover most use cases. However, you can add custom properties to the survey elements if you want to extend their functionality. Custom properties can be serialized and included in the survey JSON schema. Both built-in and custom properties are set in the Property Grid of Survey Creator.

To add a custom property, call the addProperty(questionType, propertySettings) method on the Survey.Serializer object. This method accepts the following arguments:

  • questionType
    A string value that specifies the question type to which the property should be added. You can use a specific type (see the getType description) or one of the base types. In the latter case, the new property is added to all question types derived from the base type. Refer to the API of a specific question type for information on its inheritance chain.

  • propertySettings
    Settings that configure the property's appearance and behavior. For information about these settings, refer to the following help section: Survey Element Property Settings.

This demo shows how to add custom properties to the survey, page, and all questions.

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.