Form_for name

Hello,
I have a form in which I am using some javascript to disable the submit
button after it is clicked. However, it ceases to submit the form. Thus,
I need to use a javascript line that submits it. No problem there, but
it won’t work because the form doesn’t have a ‘name’ tag. Using form_for
in my rhtml page in this manner:

<% form_for :push_ex, :url => { :controller => ‘push’, :action =>
‘index’, :type => ‘push_ex’} do %>

results in this html:

I need the Ruby to render the HTML as:

I tried adding :name => “push_ex” in the form_for tag, but it doesn’t do
anything. What can I do to add the name to the form?

Thanks!!!

  • Jeff M.

On 25 Apr 2008, at 23:27, Jeff M. wrote:

<% form_for :push_ex, :url => { :controller => ‘push’, :action =>
‘index’, :type => ‘push_ex’} do %>

<% form_for :push_ex, :url => { :controller => ‘push’, :action =>
‘index’, :type => ‘push_ex’}, :html => {:name => ‘push_ex’} do %>

should do the trick

Fred

thanks, man! you’re a wealth of information! I think you’ve answered my
last 3 or 4 questions!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs