Specify ID for a form?

Hi all,

I have a a really, really dumb Newb question… I am trying to use
observe_form to use AJAX calls in order to refresh a particular page
fragment using the form data.

I have run into a stumbling block very early on in the process - how can
provide an ‘id’ attribute to the form_remote_tag or start_form_tag
Specifying something like :id => ‘myForm’ doesn’t appear to add an ID
attribute in the generated HTML. Any help would be greatly appreciated!



use a hidden fields to add additional parameters. these are not
displayed to the user.

 <%= hidden_field_tag "formid", "myForm" %>


On 17.1.2006, at 18.44, Will B. wrote:

help would be greatly appreciated!
You need to separate the html id => … part into its own
html_options hash:

<%= start_form_tag({ :action => “edit”, :id => @article }, {:id =>
“article_form”, :enctype => “multipart/form-data”}) %>


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