surveyjs / survey-library

Free JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout.
https://surveyjs.io/form-library
MIT License
4.01k stars 782 forks source link

How to add a custom property to rate type question? #2744

Open zhitomir-oreshenski-mm opened 3 years ago

zhitomir-oreshenski-mm commented 3 years ago

Are you requesting a feature, reporting a bug or asking a question?

Question

What is the current behavior?

How to add a custom property to arate type question?

What is the expected behavior?

To have ability to add a custom property and then use it

How would you reproduce the current behavior (if this is a bug)?

Provide the test code and the tested page URL (if applicable)

Tested page URL: -

Test code

-

Specify your

andrewtelnov commented 3 years ago

@zhitomir-oreshenski-mm rate question returns "rate" for getType() function, as result you need to use the following code: Survey.Serializer("rate", {name: "yourPropertyName"} - it will add a string property. Please read the following documentation to get more information.

Thank you, Andrew