Forum: Ruby on Rails default form name in form_for

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
JannaB (Guest)
on 2009-05-30 20:59
(Received via mailing list)
Does anyone know the default name given to a form created with
form_for ? Thanks, JB
Conrad T. (Guest)
on 2009-05-30 21:41
(Received via mailing list)
On Sat, May 30, 2009 at 9:59 AM, JannaB <removed_email_address@domain.invalid>
wrote:

>
> Does anyone know the default name given to a form created with
> form_for ? Thanks, JB


There isn't a default name attribute generated when you use form_for
helper.

-Conrad
JannaB (Guest)
on 2009-05-30 22:06
(Received via mailing list)
SO...how do you get teh form name for certain Dom / javascript
functionality?
Mk 2. (Guest)
on 2009-05-30 22:11
JannaB wrote:
> SO...how do you get teh form name for certain Dom / javascript
> functionality?

Give the form a name yourself:

form_for [...], :html => { name="adsf", id="hjkl" }

See the Rails API.
This topic is locked and can not be replied to.