Jump to content

combining <text> and <input>


freelance84

Recommended Posts

In a simple text field in a form....

 

the browser automatically offers a list, when either when you click in or start typing in the field, of previous entries.

 

My question is: Does anyone know how to control this? Is it possible to give a list of values to the browser, sort of like a ajax search, but all sent before.

 

For example; in one field the user must enter a name, i want the text box to offer name possibilities even before the user has entered any on the form previously... sort of combining the <text> with a <select> menu... with all the name possibilities coming from a mysql table

Link to comment
https://forums.phpfreaks.com/topic/211861-combining-and/
Share on other sites

The browser only suggests what you've entered before; the only control over that you have is to disable it with the autocomplete attribute. You could use JavaScript though to create the suggestions? jQuery a couple of plug-ins that would make things a lot easier for you too..

 

http://docs.jquery.com/Plugins/Autocomplete

Link to comment
https://forums.phpfreaks.com/topic/211861-combining-and/#findComment-1104286
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.