custom-widgets
custom-widgets copied to clipboard
Is there documentation for how to build your own custom widget?
I read this article and it says:
SurveyJS gives you an easy way to integrate any JavaScript widget. There are hundreds and thousands different JavaScript widgets on the web. Absolutely the most of them, you may integrate into SurveyJS using our Custom Widget support feature. It brings a truly unlimited functionality into the library.
I've scoured the docs and the code base, but I don't see any documentation on how to go about making a custom widget. Is this something I will have to piece together from looking at the source?
@KendallPark So far we have only source code of our custom widgets: https://github.com/surveyjs/widgets/tree/master/src We do not have any documentation yet. We have changed the way we work with custom widgets 2-3 weeks ago. What widget do you want to integrate?
Thank you, Andrew
I'm interested in building a slider such as the one here: http://seiyria.com/bootstrap-slider/.
I'm also interested in a different layout for the rating.
I don't like the style of the above. I'd rather have something like the below:
I would also like to have some way to format data from the json survey file. I'm building a survey that requires a dynamic interactive element as part of the survey. There's no easy way, it seems, to place it inside the survey, so I have to use some jquery hackery to update a part of the page outside of the survey when the user moves to and from separate pages.
we could create a custom widget with "bootstrap-slider" or you could do it by yourself according to our code (https://github.com/surveyjs/widgets/blob/master/src/nouislider.js) - I've created an issue
as for rating we need to add some additional classes for the rating question and then we could customize it by simple css - I've created an issue
we will think about custom widget documentation
@KendallPark rating example (with dev cdn) https://plnkr.co/edit/OKwOTJyl8hbD9wUMTgAp?p=preview
Please go to this plunker and select customwidget.js to review the code and comments.
The same plunker example, but for Survey Creator / Form Builder