Question T15421
Visible to All Users

Custom question autocomplete

created a year ago

Hello,

I have a problem. I've created custom Country field. And it doesn't work in case of browser autocomplete.
Can you say some event where can I set field to json or can I block autocomplete for this field?

Thanks,
Anton

Answers approved by surveyjs Support

created a year ago

Hello Anton,
Do you want to disable autocomplete functionality? We render autoComplete attribute if dropdown "autocomplete" property is set. Could you check what does your custom question render?

Thank you,
Andrew
SurveyJS Team

    Show previous comments (1)
    AT AT
    Andrew Telnov a year ago

      Hello Anton,
      I can see in our code that we set "autocomplete" attribute to "off". Generally, this attribute works for "input" and "form" tags only. How do you want it works? I am not sure, we will be able to implement it, but we will discuss it at least.

      Thank you,
      Andrew
      SurveyJS Team

        Will be better if you fix autocomplete and it will work as expected. If not then we want to switch off autocomplete just for one field (in my case this is country field).

        Thanks,
        Anton

        AT AT
        Andrew Telnov a year ago

          Anton, I am sorry. I am lost. Do you have autocomplete functionality for our "dropdown" or you don't have it?
          Because I can see in our code that we set "autocomplete" attribute to "off". I can see it in our rendered html code as well.

          Thank you,
          Andrew
          SurveyJS Team

          Other Answers

          created a year ago (modified a year ago)

          Andrew, I didn't catch your question. I've sent the code what I have and I didn't add autocomplete somewhere in other code. But autocomplete works for the survey. And it works for single input fields but not for custom country component. I've attached screenshot. After the autocomplete done user will see field like this. But Country not attached to Json and if user will press on country field then autocompleted country disappears.

          Clipboard-File-1.png

          Thanks,
          Anton

            Show previous comments (6)

              Hello,

              We removed autocomplete/autofill for dropdown questions only.
              I tested version 1.9.117 on this Plunker https://plnkr.co/edit/EZDinkIC492c2t9S
              For me it works ok.
              Clipboard-File-2.png
              You can see on this screenshot that three first fields are marked with blue color as autocompleted, but the last (country) is not.
              If you still have the issue, can you provide your plunker that reproduces the issue?

              Thank you,
              Alex
              SurveyJS Team

                Thank you Andrew!

                It was a cache on my side.

                Thanks,
                Anton

                  You are welcome, Anton!