Hi surveyJS team!
I created a custom property (in my case, a tooltip), which should render on every questions (like in my case it displays a ? next to every question titles, and add a "title" property to the html element title).
To render it, I know I can use the onAfterRenderQuestion
event of the SurveyModel
class, but we can only define it after creating the new survey object and I would need to define it before creating the instance (this is because we create multiple instance of survey creator in many places in our code, and I would like to not duplicate the render method since it is for all our surveys).
Previously we achieved this by creating a custom widget, with a fit method which matches all questions, but now we need to use others widgets (from the surveyjs-widgets library) and since a question cannot be matched by multiple widgets, the trick doesn't work anymore for these questions.
Is there a a way to achieve this?
Thanks,
Alexis
Hello,
Are your question related to SurveyJS Creator or to Survey LIbrary?
There are several ways for library: you can extract event subscription code into a helper function and call it on every survey creation; if you are using Typescript, you can create a descendant for survey model.
SurveyJS Creator is a commercially licensed product. Can you write us form the email linked to your license?
Thanks, Serge
SurveyJS Team
Hello,
Yes sorry for the misunderstanding, it was about the SurveyJS library. Thank you for your answer, I thought about that solution too but I wanted to be sure that there is not another better way to achieve this.
Thanks for your time!
Alexis