abk
abk

Reputation: 1

how to add id to this rails form <%= form_for @admin do |f| %>

I have problems to add the id="signup" to my form: i had tried but it was not working .

<%= form_for @admin, :id => "signup" do |f| %> 

it is not working .How to add an html id to a form_for tag in rails?

Upvotes: 0

Views: 139

Answers (2)

Rajdeep Singh
Rajdeep Singh

Reputation: 17834

You need to add this under html in rails

<%= form_for @admin, :html => { :id => "signup" } do |f| %>

Upvotes: 2

LHH
LHH

Reputation: 3323

Try this

<%= form_for @admin, :html => {:id => 'signup'} do |f|%>

Upvotes: 0

Related Questions