My project use React. I have created a custom table question extends from SurveyQuestionElementBase, by using registerQuestion I can render the question in the survey. But I'm not very sure about what is the best practice to access custom widgets answer.
Thanks!
Question
T12766
Visible to All Users
Hello Wenjing,
You can declare a
value
property for your custom question and return the required value taken from your custom table. For instance, take a look at the following demo: Add a Custom Question Type. In this sample, we implement a custom question based on a React Color component. TheSurveyQuestionColorPicker
class extends theSurveyQuestionElementBase
and implements thevalue
property. This property returns the value of a base question object:get value() { return this.question.value; }
You can implement this property and return a necessary value.
Please let me know if this helps.