Using auto_complete on multiple text_fields within a form

I’ve got a model with a number of attributes – a bicycle with all of
the various components on it. When the user enters the bike’s make and
model (among other things), I want to make sure that we don’t
duplicate a brand name (for example: Fuji is a single brand and it
would suck to have Fuji, fujee and fUGI in the DB somehow).

I’ve been tinkering with the auto_complete plugin and have managed to
get it to work for a single attribute of the bike model. Is there a
way to get it to work with multiple fields within the same form?

If there’s an alternative way to handle this, I’m all ears!

Paul Singh wrote:
I've got a model with a number of attributes -- a bicycle 
with all of
the various components on it. When the user enters the bike's make and
model (among other things), I want to make sure that we don't
duplicate a brand name (for example: Fuji is a single brand and it
would suck to have Fuji, fujee and fUGI in the DB somehow).

I’ve been tinkering with the auto_complete plugin and have managed to
get it to work for a single attribute of the bike model. Is there a
way to get it to work with multiple fields within the same form?

If there’s an alternative way to handle this, I’m all ears!

Why not just give a select list of the brands.  You can make up a table with all the brands (with maybe an 'other' for strange ones) and make a select list from that that the user can pick from.  That way you will not get alternative versions.

Norm

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---