Question T4063
Visible to All Users

Regarding Custom Question Type

created 5 years ago

Hi Team,

We have added custom questions based on third party library as React Component as we are using react version of library.
Now we have to replicate same behavior in Test Survey.

Can you suggest someway how we can use same React Component in Creator to have same behavior as Survey Library(React).

Thanks
Vinay

Answers approved by surveyjs Support

created 5 years ago

Hello,
It depends how you implement rendering for this custom question that based on react component.
We are using knockout (small MVVM library) for SurveyJS Creator and we do not have react version. You can deal with it as vanila JavaScript library.
If you want to show in the test survey SurveyJS Library a react version, then you have to hide the default "Test Survey" tab and implements your own, where react SurveyJS library is using.
Here is the example of adding a custom tab.

Thank you,
Andrew
SurveyJS Team

    Show previous comments (4)

      Hello Vinay,
      You are adding this code into react version of SurveyJS Library. SurveyJS Creator doesn't use it and as result you can't introduce it into SurveyJS Creator logic tab.
      Please read the following doc about custom widgets. This is the correct way to introduce new custom widget into Library and SurveyJS Creator.

      Thank you,
      Andrew
      SurveyJS Team

        Thanks for Inputs

          Please feel free to contact us in case of any further questions.

          Thanks, Serge
          SurveyJS Team