web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

How disable visitor browser auto-fill with look-up fields such as Country?

(0) ShareShare
ReportReport
Posted on by 562

The browser auto-fill like you get in Chome and Edge is causing a lot of issues when a visitor tries to submit an embedded form that uses Look-up Fields such as "Country",  "Region/State"
From the visitors perspective, the form looks correct as eg the correct country is shown when they try to submit the form. They are unable to submit and cannot see the reason why. So they call us and are pissed off.

Since Country and Region/State are look-up fields they have to manually select the country from the list every time. This is not obvious to them.

Is there a script or some code i can add to my embedded form script that will tell browsers to disable auto-fill?

The only alternative i might have to consider is replacing the look-up fields with a Country drop-down field but this is not something we want to make and would take a lot of time to implement as we have hundreds of active forms and the look-up field is connected to many other dynamic instances.



I have the same question (0)
  • Suggested answer
    Petr Jantac Profile Picture
    Moderator on at
    RE: How disable visitor browser auto-fill with look-up fields such as Country?

    Hi Chris,

    You can try to set the autocomplete attribute to value "off" in the HTML source code.

    Example:

     <input type="text" name="email" autocomplete="off" />

    Thank you.

    Petr

  • CHK1970 Profile Picture
    562 on at
    RE: How disable visitor browser auto-fill with look-up fields such as Country?

    Hi Petr, Where exactly in the source. Do you mean added inside the form script or placed as html on my external webpage. What is the reference to name="email" when the issue is with country look-up field?  Has you recommendation been tested before or is this a guess?

  • Suggested answer
    Petr Jantac Profile Picture
    Moderator on at
    RE: How disable visitor browser auto-fill with look-up fields such as Country?

    Hi Chris,

    You should edit the HTML source code of the form created in D365 Marketing. That's the most effective and tested way to achieve the intended result.

    Open the marketing form in D365 Marketing form editor. Click on the HTML tab to access the form HTML code:

    pastedimage1663679668097v1.png

    Find the label "country". There will be an input tag following that label:

    pastedimage1663679914195v2.png

    Add autocomplete="off" attribute to that input, as shown on the picture above.

    I kindly recommend you test this HTML editing on some test environment first before modifying the production form. Just to make sure that the HTML editing was done correctly.

    Thank you.

    Petr

  • CHK1970 Profile Picture
    562 on at
    RE: How disable visitor browser auto-fill with look-up fields such as Country?

    Hi Petr, I made the changes that you suggested, republished the form, and cleared all cache, but this still does not work. When starting to add the first name fields they all populated and unfortunately Country is added by autofill and not selected in the Look-up. The form will then not submit.

  • CHK1970 Profile Picture
    562 on at
    RE: How disable visitor browser auto-fill with look-up fields such as Country?

    The lookup field for Country when inspected says "autocomplete="off". I have added the autocomplete="new-password" into the form and published. This however is not reflected when i inspect the field. It still says autocomplete="off". This only happens when i edit a look-up field. All other text input fields are updating with new-password accordingly.


    pastedimage1663685249583v1.png

    Here you can test yourself.

    A Pen by Genchev Dobri (codepen.io)  Set to "new-password" for Country field and this works.

    Is there somewhere else we need to edit the Lookup fields and add autocomplete="new-password"  to get this to work. It seems the Look-up fields are being cached somehow!

  • CHK1970 Profile Picture
    562 on at
    RE: How disable visitor browser auto-fill with look-up fields such as Country?

    Hi Petr, any update from your side regarding this issue? autocomplete="off" does not work today. autocomplete="new-password" does work. Do i need to submit a support request to Microsoft so they start to look at this?  

    I cannot manually change a look-up filed. Its a system field that comes from you guys!  

    Please can you advise of any progress?

  • Suggested answer
    CHK1970 Profile Picture
    562 on at
    RE: How disable visitor browser auto-fill with look-up fields such as Country?

    Hi,

    FYI, since we have has no reply from a Microsoft perspective regarding this issue, we have solved this ourselves with script on our website added via Tag manager.
    This is not the optimal solution since Microsoft should take care of this issue themselves.

    I have created a support ticket with them.

    I will be happy to share the script if others need it!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 241

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 164 Super User 2025 Season 2

#3
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 153

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans