Fill form when collection_select is changed

Hey there. :slight_smile:
I have a problem.
I have collection_select, witch takes values from DB
I need to run fill textboxes from other table in DB, when
collection_select is selected… can anyone tell me how can i make this
run function when collection_select is changed, cos my code is not
working…
And i have jquery in my ruby on rails project, so thats ok…

my code:

    <%= f.label :stick_type %>
    <%= h.collection_select :stick_id, Stick.all, :id, :stick_type,

:prompt => “Select Stick”, :onchange => “fill_form(this)” %>

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs