DelphiFAQ Home Search:
General :: Web publishing
Information about web publishing, how to maintain, optimize and promote a web site.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.
Recommended links on this topic:
Featured Article

How can I make autocomplete work in my form?

Question:

We have a web form and not all of the fields link with the autocomplete function properly - some fields are not offering the values that users put in using other forms on other sites. Do we have to use special field names for our input fields?

Answer:

Using predefined field names would be a solution, or you can provide a mapping. That way you do not have to change your javascript and/or CGI code that you built around the form's input fields' names.

Explanation: Internet Explorer encrypts the autocomplete entries/values and stores them on the user's machine using vCard. vCard specifies certain properties about a user, for example their name, address, telephone number, e-mail address etc.
Any of these standard vCard values can be made available for a particular input field, even if it does not have the same name, as in your case.

The syntax for the mapping is shown at the bottom. Here is a list of the defined vCard properties:


vCard Name What it means
vCard.FirstName First Name
vCard.LastName Last Name
vCard.MiddleName Middle Name
vCard.DisplayName Displayed Name
vCard.Gender Gender
vCard.Email E-mail address
vCard.Home.StreetAddress Personal Address : Street Address
vCard.Home.City Personal Address : City
vCard.Home.State Personal Address : State
vCard.Home.Country Personal Address : Country
vCard.Home.Zipcode Personal Address : Zip Code
vCard.Home.Phone Personal Address : Phone Number
vCard.Home.Fax Personal Address : Fax Number
vCard.Cellular Cellphone Number
vCard.Pager Pager Number
vCard.Homepage Personal Homepage URL
vCard.JobTitle Job Title
vCard.Department Department
vCard.Office Office
vCard.Company Company Name
vCard.Business.StreetAddress Business/Company Address : Street Address
vCard.Business.City Business/Company Address : City
vCard.Business.State Business/Company Address : State
vCard.Business.Country Business/Company Address : Country
vCard.Business.Zipcode Business/Company Address : Zip Code
vCard.Business.Phone Business/Company Address : Phone Number
vCard.Business.Fax Business/Company Address : Fax Number
vCard.Business.URL Business/Company Website - URL
vCard.Notes Notes

<form>
 First Name:
 <input type="text" name="nam1" vcard_name="vCard.FirstName">
 
 Last Name:
 <input type="text" name="nam2"
 vcard_name="vCard.LastName">
 
 Email:
 <input type="text" name="user_email" vcard_name="vCard.Email">
 
 Country:
 <input type="text" name="Ctry" vcard_name="vCard.Home.Country">
 
 </form>
 

Generated 12:02:13 on Sep 19, 2017