How to Disable or Turn on/off HTML5 Form Fields Autocomplete Suggestions in Browser

How to Disable or Turn on/off HTML5 Form Fields Autocomplete Suggestions in Browser There may be many doubts when it comes to this article. We hope that after reading this article all doubts will be resolved. Let’s go to the article.

Allows many users to collect form data in their browsers. However, there may be situations where this may not work accurately or you may want users to manually insert all the information into the details. Also, users may have privacy concerns, so browsers may allow users to disable it.

How to Disable or Turn on/off HTML5 Form Fields Autocomplete Suggestions in Browser

Turn Off Autocomplete

Use the autocomplete attribute to turn off autocomplete for input fields:

How to Disable or Turn on/off HTML5 Form Fields Autocomplete Suggestions in Browser

index.html

<!DOCTYPE html>
<html>

<head>
    <title>Autocmplete on/off</title>

    <style>
        h1 {
            color: green;
        }
    </style>
</head>

<body style="text-align:center;">
    
    <h1 style="color:green;">
        GeeksforGeeks
    </h1>
    
    <h4>Autocmplete on/off</h4>
    
    <form action="https://ide.geeksforgeeks.org/tryit.php"
                    autocomplete="on">
        First name: <input type="text" name="fname">
        
        <br><br>
        
        Last name: <input type="text" name="lname">
        
        <br><br>
        
        Email_id: <input type="email" name="email"
                    autocomplete="off">
        
        <br><br>
        
        <input type="submit">
    </form>
    
    <p>
        <b>Note:</b> autocomplete is "on" for the
        form, but "off" for the e-mail field.
    </p>
</body>

</html>

Read Also: How to Place or Write Text on Image in Browser Using HTML5 and CSS3

Final Thoughts

How to Disable or Turn on/off HTML5 Form Fields Autocomplete Suggestions in Browser We hope all your doubts about this topic will be resolved. See you again in the next article Thank you.

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Deekshi. Here, I post about programming to help developers.

Share on:

Leave a Comment