How to Disable or Turn on/off HTML5 Form Fields Autocomplete Suggestions in Browser Full Project For Beginners

 

Welcome folks today in this blog post we will be disabling or turning on/off html5 form fields autocomplete suggestions in browser.All the full source code of the application is given below.

 

 

 

Get Started

 

 

 

In order to get started you need to make an index.html file and copy paste the following code

 

 

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>

 

See also  How to Flip an Image on Mouse Hover Using Pure CSS3 Full Project For Beginners

 

 

In the above code we are using the special html5 form attribute called autocomplete to turn on/off autocomplete suggestions inside the form input fields

Leave a Reply