Forum: Ruby on Rails How do i get a Form id (Not the action id one)

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
525e0c75f4f5c1d0ab0b6cc91575b74f?d=identicon&s=25 Emil Kampp (emuen)
on 2007-01-29 07:39
Hi there.

Im in dire need of some assistance;

I need to give my form this syntax:

>> <form action="some_action/some_id" method="get" id="form_id">

The important part here, is the id="form_id" the rest, i can make by
this code:

>> <%= form_tag :action => 'some_action %>

Does anyone have som egood idears ?

 - Emil
C4dc94c893471878a105761a9207f29b?d=identicon&s=25 Zack Chandler (Guest)
on 2007-01-29 07:51
(Received via mailing list)
On 1/28/07, Emil Kampp <> wrote:
> this code:
> >


form_tag( { :action => 'do_something' }, { :id => 'my_id' } )

Also, if you're on Rails 1.2 use the block version:

<% form_tag(...) do %>
<% end %>

Hope this helps.

Zack Chandler
Fd5b8048d157a919043272d6292cb2b1?d=identicon&s=25 alex (Guest)
on 2007-02-01 12:04
(Received via mailing list)
Try posting your question on I got my answer there quite

On Jan 29, 7:39 am, Emil Kampp <>
This topic is locked and can not be replied to.