Generate Domain Model Code

Edit in →

This example demonstrates how to generate server-side domain model code based on a client-side survey JSON schema. This functionality is part of a wider use case described in the following help topic: No-code Editor for Domain Models.

To generate domain model code in your application, implement a text parser that converts JSON to the server-side code language you prefer (C# in this demo). View the codegenerator.js file to see the implementation.

In this demo, you can see the generated domain model code under the Domain Model Code tab in Survey Creator. To implement this UI, create a component that renders a <textarea> and call the addTab(tabOptions) method on a SurveyCreatorModel instance to register the component as a plugin.

Domain model property names are converted from form field names, so you need to ensure against unsupported symbols. Handle Survey Creator's onPropertyDisplayCustomError event to validate the names.

Your cookie settings

We use cookies to make your browsing experience more convenient and personal. Some cookies are essential, while others help us analyse traffic. Your personal data and cookies may be used for ad personalization. By clicking “Accept All”, you consent to the use of all cookies as described in our Terms of Use and Privacy Statement. You can manage your preferences in “Cookie settings.”

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.