If I have table user (id, firstname, lastname, age, city)
And form: textboxes for firstname, lastname, age and select for city
Is it possible to auto complete form? Not only firstname or lastname,
but full form?
So if I enter lastname, and there is only one user with this name, so it
auto complete firstname, age and city.
If I have table user (id, firstname, lastname, age, city)
And form: textboxes for firstname, lastname, age and select for city
Is it possible to auto complete form? Not only firstname or lastname,
but full form?
So if I enter lastname, and there is only one user with this name, so it
auto complete firstname, age and city.
Hello there,
Why don’t you try a form_observer to do the job?
(controller)
def search_result @foo = User.find(:all, :conditions => [“first_name LIKE ?, last_name
LIKE ?”,params[:first_name], params[:last_name]])
render view again
end
I don’t now if what you want to do is a good idea, but… that is the
way I’ll do it (what does not mean that is the best way, I’m new in
Rails).
David S.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.