Question T6401
Visible to All Users

Custom widgets are not available in SurveyJS Creator

created 4 years ago (modified 4 years ago)

[Ticket cloned from T6351: Google Address Auto Complete js]

Hi Serge,

I am not sure if it is a bug in Survey Creator. I have added following 3 custom widget JS(boostrapdate picker, sortable js and google address auto complete) to survey-creator.html ,

HTML
<script src="https://unpkg.com/inputmask@5.0.3/dist/inputmask.js"></script> <script src="https://unpkg.com/sortablejs@1.7.0/Sortable.js"></script> <script src="https://unpkg.com/moment@2.24.0/moment.js"></script><link rel="stylesheet" href="https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css" type="text/css" rel="stylesheet"/> <script src="https://unpkg.com/surveyjs-widgets@1.8.31/surveyjs-widgets.js"></script> <script src="https://maps.googleapis.com/maps/api/js?key=&libraries=places"></script> <script type="text/javascript" src="./customwidget.js"></script> <link href="./customwidget.css" type="text/css" rel="stylesheet"/>

but only one widget icon is showing in the toolbox:

Toolbox-Googleautocomplete.PNG

though other 2 are not visible in toolbox, but it works fine in the question. I mean if I add question json which contains above 3 custom widgets property, it works fine.

So I am not sure if it is the issue in toolbox displaying custom widget entries on the Survey Creator. Please confirm if it is a bug. I am ready to buy the full license now :)

Thanks,

Answers approved by surveyjs Support

created 4 years ago

Hello,

Here is the working sample on our site - https://surveyjs.io/Examples/Survey-Creator?id=customwidgets&theme=bootstrap
It contains all custom widgets. If you share a minimal working sample illustrating the issue we could check it.

Thanks, Serge
SurveyJS Team

    Comments (2)

      On yout repo https://github.com/surveyjs/surveyjs-nodejs, on the survey-creator.html file, please add below code:

      <script src="https://unpkg.com/inputmask@5.0.3/dist/inputmask.js"></script> <script src="https://unpkg.com/sortablejs@1.7.0/Sortable.js"></script> <script src="https://unpkg.com/moment@2.24.0/moment.js"></script><link rel="stylesheet" href="https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css" type="text/css" rel="stylesheet"/> <script src="https://unpkg.com/surveyjs-widgets@1.8.31/surveyjs-widgets.js"></script> <script src="https://maps.googleapis.com/maps/api/js?key=&libraries=places"></script> <script type="text/javascript" src="./customwidget.js"></script> <link href="./customwidget.css" type="text/css" rel="stylesheet"/>

      You will see only one entry appearing on the toolbox (may be it is truncated?).

      Thanks,

        Hello,

        Unfortunately it's impossible to find the cause of the issue by several lines of code taken out of context.
        If you share a minimal working sample illustrating the issue we could check it.

        Thanks, Serge
        SurveyJS Team