Using Autocomplete On Your Forms (Or Not)

By Joe Burns

Just with what you've read so far, you can probably guess how to use the AutoComplete to your advantage when you design your own Web page. Maybe you'd prefer that your visitors only be given the opportunity to choose from responses they've put into forms that you've created. This would be useful if you have a form page where people need to put in shipping numbers or part numbers, and all those other AutoComplete responses might clutter things up. Maybe you would just like to be an island unto yourself.

In any case, make a point of giving each of your form elements an extremely odd NAME attribute, maybe even a random set of letters. That way only responses given to your own form will be offered as choices.

I want the silly thing turned off altogether.

If that's the case, then you'll need to start playing around with the AUTOCOMPLETE attribute. If you'd like to shut off AutoComplete for the entire form, put the attribute in the main FORM tag, set to "off".

<FORM METHOD="post" ACTION="/cgi-bin/joe.cgi" AUTOCOMPLETE="off">

You can also set individual form elements to "on" if you want to override the attribute in the main FORM tag. That way each of the form elements can be turned off except that one you set to "on".

Of course, you can also set individual form elements to "off".


Erasing AutoComplete Responses

I get these questions all the time. The answers are below:

How do I erase my AutoComplete responses?

From the menu bar at the top of your browser, choose:
Tools > Internet Options > Content Tab > AutoComplete Button > Clear Forms.

How do I clear just one AutoComplete response?

In a form element, put in at least one letter so that the AutoComplete responses are made visible. Using your arrow keys, scroll down to highlight the response you want to erase. Push the Delete key on your keyboard. The response will erase itself from the list.


That's That

I love AutoComplete, and now that I have a fairly good handle on how it works and how I can manipulate it for my own purposes, I like it even more. I hope you get to use the code I've shown above. I've already found a couple of uses for it myself.

 Enjoy!



Make a Comment

Loading Comments...

  • Web Development Newsletter Signup

    Invalid email
    You have successfuly registered to our newsletter.
  •  
  •  
  •