Auto Complete Form Field

hello guys,

i found easy way to create auto-complete field. actually this is HTML5 feature,  you can use list attribute in your input type which is associated with datalist that renders autocomplete while people are typing in that field.

so here is simple code!

<!DOCTYPE html>
<h2>HTML5 Form Input Autocomplete datalist</h2>
Search State:
<input type=”text” name=”srch” id=”srch” list=”datalist1″ />
<datalist id=”datalist1″>
<option value=”gujarat”>
<option value=”karnataka”>
<option value=”panjab”>
<option value=”rajasthan”>

Done 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s