Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Contributor
3025 Points
448 Posts
Mar 05, 2010 11:05 AM|LINK
Hi there,
Ideally you'll have to provide 2 forms with these 2 buttons,with a form action pointing to one of those methods in your controller.
For example on your view you might have something like:
<form method="post" action="/mycontroller/find">
<!-- some html markup here -->
<input type="submit" name="button1" id="button1" value="Search" />
</form>
<form method="post" action="/mycontroller/save">
<input type="submit" name="button2" id="button2" value="Save" />
If that's not what you require, let me know.
Hope this helps.
egor598
Contributor
3025 Points
448 Posts
Re: Two Submit button on one view
Mar 05, 2010 11:05 AM|LINK
Hi there,
Ideally you'll have to provide 2 forms with these 2 buttons,with a form action pointing to one of those methods in your controller.
For example on your view you might have something like:
<form method="post" action="/mycontroller/find">
<!-- some html markup here -->
<input type="submit" name="button1" id="button1" value="Search" />
</form>
<form method="post" action="/mycontroller/save">
<!-- some html markup here -->
<input type="submit" name="button2" id="button2" value="Save" />
</form>
If that's not what you require, let me know.
Hope this helps.