On 17.1.2006, at 18.44, Will Briggs wrote:
> 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 I provide an ''id'' attribute to the
form_remote_tag or
> start_form_tag methods? Specifying something like :id =>
''myForm''
> doesn''t appear to add an ID attribute in the generated HTML. Any
> 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"}) %>
//jarkko
>
> Thanks,
> Will
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
--
Jarkko Laine
http://jlaine.net
http://odesign.fi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2363 bytes
Desc: not available
Url :
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060117/a367fe88/smime.bin