auto suggestion or auto complete for general fields?

hujia - January 14, 2009 - 20:24

I am looking for a module that can provide auto-suggestion or auto-completion for a regular, non-taxonomy field: so that when a user types in a field of a searchbox, e.g. - the field is "animal name", then if s/he types in "ca", it can provide a pulldown list of animal names, like "cat, catepillar ...", which are selected from an existing table of mysql database. this is something like Google suggestion.

I find there are modules of auto-comlete for and based on vocabulary/taxonomy; but I have not found one for a regular field. Can you help me with that?
thanks! hujia

autocomplete

Bacteria Man - January 14, 2009 - 20:38

There's a variety of ways to implement autocomplete. Are you using CCK and creating a custom module?

-------------------------------------------------------

"If you don't read the newspaper you are uninformed;
if you do read the newspaper you are misinformed."
-- Mark Twain

I am using cck and my search

hujia - January 14, 2009 - 23:46

I am using cck and my search is basically my custom module. I am thinking of adding my own ajax auto suggest, but I'm also very interested to know if there are already some modules already laying there around to download and plugin ...
thanks! H

Do any of these

kellyexpo24 - October 29, 2009 - 20:11

Do any of these work?

http://webtecker.com/2008/03/10/10-auto-complete-ajax-scripts/

I've seen these scripts around a lot. There should be a number of free copies to grab. Credit if it's for commercial purposes of course ;)

Kelly net worth

Hi I have a similar

dewbie - July 4, 2009 - 11:56

Hi
I have a similar requirement. I want to achieve this for a 5 field form on my homepage. I am new to drupal. Can you please share the code snippett and advice me how to go about it.

autocomplete cont.

Bacteria Man - July 4, 2009 - 16:58

You're best bet is to create a Views block containing a form built with CCK fields defined as autocomplete. The autocomplete fields need to be associated with a data source like users, taxonomy terms or even custom (the latter requiring additional effort.)

-------------------------------------------------------

"I remember that sound. That's a bad sound."
-- Gwen DeMarco

Auto suggest names - fetched from Database or file system

dewbie - July 6, 2009 - 07:57

Hi

My requirement is to provide user the ease of selecting an option- which appear as a part of a suggestion list , which pops up as the user types in the name of city or state or country.
Can you please tell me more about the View Block and CCk?
And what are the steps i need to follow to achieve the above?

Thanks

You could create a predefined

Bacteria Man - July 6, 2009 - 11:53

You could create a predefined or free-tag taxonomy vocabulary containing city, state and country terms and then associate it with the content type (presumably a profile.) Set the CCK field as autocomplete, which will give you the type ahead behavior you want.

There should be how-to's already available on how to accomplish this or something like it.

-------------------------------------------------------

"I remember that sound. That's a bad sound."
-- Gwen DeMarco

Hpw could I do the same ypu

mortenson - October 22, 2009 - 14:11

Hpw could I do the same ypu mention (bacteria man) but for a profile field?

profile field

Bacteria Man - October 22, 2009 - 15:05

I assume you're asking about the core profile module (?) If so, create a "freeform list" profile field.

-------------------------------------------------------

"I remember that sound. That's a bad sound."
-- Gwen DeMarco

Yes I am asking about core

mortenson - October 28, 2009 - 13:50

Yes I am asking about core profile module

I need to build a field for the user to enter "University" in their profile. So that when he types the form will autocomplete (like Facebook).

If I create a freefor list where would I put the options I want to give(the database with all the universities)?

thanks for any help

single-line textfield

Bacteria Man - October 28, 2009 - 18:45

I actually misspoke in my last post. It sounds like what you want is a "single-line textfield" w/ autocomplete enabled ("Form will auto-complete while user is typing.") However this still might not give you what you want because the autocomplete entries is limited to previously entered values by users (and assuming the "access user profiles" permission is enabled.)

If you want to use a pre-defined list of entries you'll probably need to create a custom module. However the core profile module doesn't provide the necessary hooks to make this easy. You might want to consider switching to Content Profile (Drupal 6) so you can utilized CCK fields and better autocomplete support.

-------------------------------------------------------

"I remember that sound. That's a bad sound."
-- Gwen DeMarco

That is exactly what I

mortenson - October 29, 2009 - 15:25

That is exactly what I need.

So you recomned swithching to Content Profile and then create a custom module?
So you can`t get rid of developing anyway?

Content Profile

Bacteria Man - October 29, 2009 - 17:58

Content Profile stores the profile data as nodes. This will allow you to associate a taxonomy category with predefine the terms. However the autocomplete requirement still remains. You might check out this module (with the funny name) and see if it'll get you the rest of the way there.

-------------------------------------------------------

"I remember that sound. That's a bad sound."
-- Gwen DeMarco

 
 

Drupal is a registered trademark of Dries Buytaert.