pass form builder in remote_function in rails ?

Posted by richard moss on Stack Overflow See other posts from Stack Overflow or by richard moss
Published on 2009-12-17T19:16:24Z Indexed on 2010/03/09 4:06 UTC
Read the original article Hit count: 350

Filed under:
|
|
|
|

hi all

i have select box where on change i need to grab the value and via remote function get some field names from db and then generate those field further down the form depwning on whatoption from the select box is chosen.

The problem is is that the fields are in a f.form_for so are using the formbuilder f that has the select box in. So when i render the partial via ajax in the controller i get an error as i dont have a reference to the local form builder f.

does anyone know how or if i can get reference to the form builder orif can pass it in a remote function call and then pass into my locals in the partial ?

thanks alot, any help will be great as been stuck on this a long time!

cheers rick

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby