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.
9f4a65c520a69cd357d830661e172272?d=identicon&s=25 JannaB (Guest)
on 2009-05-30 18:59
(Received via mailing list)
Does anyone know the default name given to a form created with
form_for ? Thanks, JB
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (conradwt)
on 2009-05-30 19:41
(Received via mailing list)
On Sat, May 30, 2009 at 9:59 AM, JannaB <mistressjanna@hotmail.com>
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
9f4a65c520a69cd357d830661e172272?d=identicon&s=25 JannaB (Guest)
on 2009-05-30 20:06
(Received via mailing list)
SO...how do you get teh form name for certain Dom / javascript
functionality?
68814ed988eee4f21b2cd07353e5e445?d=identicon&s=25 Mk 27 (mk27)
on 2009-05-30 20: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.