Question T164
Visible to All Users

Table in "description"

created 7 years ago

Hello!

I am developing a survey with your library and would like to add a simple HTML table in the description of every quiestion.

…{
"type": "checkbox",

"description": ----- HTML TABLE ------,
"name": "Some name",
"title": "Some title"
} …

It is in any way possible to make it?

P.S. In addition to SurveyJS, I am using reactJS, noUISlider and the showdown library.

Thank you in advance,
Stela Dinkova

Answers

created 7 years ago

Hello Stela,
There is no much options, if you want to replace the current description rendering with your own:

  1. use a markdown library and you do not want to do it
  2. use survey.onAfterRenderQuestion event, here is demo: https://surveyjs.io/Examples/Library/?id=survey-afterrender&platform=Reactjs
  3. Fork the project, modify the renderDescription function in https://github.com/surveyjs/surveyjs/blob/master/src/react/reactquestion.tsx as you want and build your own version. You may find the instruction in the Readme file.

We may probably add the ability to override react rendering in the future, so you do not need to have your own version of SurveyJS. However, it is for future version.

Let me know if it helps.

Thank you,
Andrew

    Comments (1)

      Hello, Andrew!

      Thank you for quick response. Since the table is at this point "nice to have" and not a "must", we will not yet modify the functions of the library. If we however decide to try it at a later stage, I will let you know if it worked and how.

      Best regards,
      Stela Dinkova