DelphiFAQ Home Search:

How can I make autocomplete work in my form?

 

comments5 comments. Current rating: 5 stars (2 votes). Leave comments and/ or rate it.

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>

Comments:

2008-02-13, 01:47:15
anonymous  
don't know what this is? please ellaborate on how to use it
2010-02-04, 23:52:17   (updated: 2010-02-04, 23:54:04)
shridhar.mg@excelindia.c from India  
rating
its working for submit Button and aspx.net buton....But its not prompting the save password for Aspx.net Link button
2010-02-04, 23:55:14
from India  
rating
its working for submit Button and aspx.net buton....But its not prompting the save password for Aspx.net Link button
2012-07-21, 02:34:26
aidehuaa@yahoo.com from China  
Your blog article content is very deep , with very strong philosophical knowledge , these have great value . We very much enjoy your share , benefit from a lot . Thank you for your sharing, I am very much looking forward to more of your wonderful sharing .
2013-06-05, 22:58:07
anonymous from United States  

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: