surveyjs / survey-creator

Scalable open-source survey software to generate dynamic JSON-driven forms within your JavaScript application. The form builder features a drag-and-drop UI, CSS Theme Editor, and GUI for conditional logic and form branching.
https://surveyjs.io/open-source
Other
900 stars 370 forks source link

Can't add "inputmask" to the toolbox #2029

Open PhunkyBob opened 3 years ago

PhunkyBob commented 3 years ago

Hello,

I would like to have some "money" input in my survey with little formating (thouthand separator, € symbol). I wanted to use "inputmask" since it looks like it does that.

Unfortunatly, I don't succeed to add it to the toolbox.

I installed surveyjs-nodejs with NPM. I modified my survey-creator.html file to add the following lines:

        <script src="https://unpkg.com/inputmask@5.0.3/dist/inputmask.js"></script>
        <script src="https://unpkg.com/surveyjs-widgets@1.8.65/surveyjs-widgets.min.js"></script>

(I tried with other versions too) like it's done on https://surveyjs.io/Examples/Library?id=custom-widget-inputmask&platform=Knockoutjs&theme=default

When I start survey-creator, I don't see this widget in the toolbox.

If I try other custom widget (sortable, tagbox, bootstrap-slider, ...) it works well.

What did I miss?

tsv2013 commented 2 years ago

The imputmask custom widget works over the "Single input" question type. Here is the working plunker sample - https://plnkr.co/edit/aLkgyLRZyap9jOKV