Forum: Ruby on Rails Submit_tag question

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.
B31c8f5031486fa50ec7ee9e1350dec9?d=identicon&s=25 Marcus Blankenship (Guest)
on 2006-05-23 00:34
(Received via mailing list)
Can I pass additional parameters when using a submit_tag?

Is this legal?

     <%= submit_tag 'Save' , { :editfacility => params["editfacility"] }
%>


When I do this, the "editfacility" parameter is always lost.  I have a
feeling I'm missing something basic...

Thanks,
Marcus
D0cd6b10e01bacb976b3b815a9c660bc?d=identicon&s=25 Alex Wayne (Guest)
on 2006-05-23 00:56
Marcus Blankenship wrote:
> Can I pass additional parameters when using a submit_tag?
>
> Is this legal?
>
>      <%= submit_tag 'Save' , { :editfacility => params["editfacility"] }
> %>
>
>
> When I do this, the "editfacility" parameter is always lost.  I have a
> feeling I'm missing something basic...
>
> Thanks,
> Marcus

You want a hidden_field, submit button only submits the form.
This topic is locked and can not be replied to.