Hi,
I am working with PHP. I have a field in my form, which is basically a text box. But as the user start to type it will show a list of matching items, fetched from mysql table. I can have a drop down, but in a drop down , I can't insert text. How to solve this? Should I use ajax or js or some thing else?

Recommended Answers

All 4 Replies

can you explain it differently, I do not understand what you need.

Do you already have this working as you want:
"I have a field in my form, which is basically a text box. But as the user start to type it will show a list of matching items, fetched from mysql table."

And you want a dropdown box that you can type in:
"I can have a drop down, but in a drop down , I can't insert text. How to solve this?"

or are these 2 fields the same thing you are just trying to figure out how to implement the best way?

Try to give me exactly what you need and I'll see what I can do.

What you need is 'auto-complete' for the field. You cannot use combination of combo-box with text field... You should be able to find a js library/file that someone has implemented it. It was quite a hot topic a while back ago about implementing auto-complete form.

Actually, I have implemented the same using drop down. But now I want to do this using a text-box/combo-box.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.