Submit_tag question


#1

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


#2

Marcus B. 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.