Question T9265
Visible to All Users

International Telephone Input widget

created 3 years ago

Hello,

How can i use a widget like https://github.com/jackocnr/intl-tel-input.
How can i add id us a custom widget.

I appreciate any help that you could offer.

Answers approved by surveyjs Support

created 3 years ago

Hello,

I've created a minimal working example with the intlTelInput widget for you - https://plnkr.co/edit/JYNek0N9sOHELqDo
But it works strange for me. Probably you need to use some other widget API functions according the https://github.com/jackocnr/intl-tel-input to setup it. All questions related to the intlTelInput widget functionality need to be addressed to the widget author.

Thanks, Serge
SurveyJS Team

    Comments (2)

      Thank you Serge,
      But i miss understand this point "All questions related to the intlTelInput widget functionality need to be addressed to the widget author."

      In the working example the value of the phone is empty after completing the survey.

        Hello,

        You are writing that "In the working example the value of the phone is empty after completing the survey.".
        In widget documentation https://github.com/jackocnr/intl-tel-input I've not found the recommended way to get a value from widget.
        I've used the following code:

        JavaScript
        input.onchange = function () { question.value = iti.getNumber(); }

        And in the preview tab you can see that entered into the widget text is present in survey results. Probably you need to use another function to get entered value from the widget. But answer on this question can give only the intlTelInput widget documentation or support.

        But i miss understand this point "All questions related to the intlTelInput widget functionality need to be addressed to the widget author."

        SurveyJS team can't be responsible for 3rd party intlTelInput widget functionality, configuration options and possible bugs.

        Thanks, Serge
        SurveyJS Team