Posts Tagged ‘submit’

Using submit_tag to pass parameters

Thursday, January 25th, 2007
No Gravatar

If you want to pass a parameter through a form, you don’t pass it through submit_tag, you pass it in start_form_tag. For example, I want to pass the value of id:
<%= start_form_tag :action => ‘create’, :id => @thisparticularid %>

This is much more secure than using a hidden field, for obvious reasons!


nogeek.org is Digg proof thanks to caching by WP Super Cache!