[thelist] Multiple Submit Button per Form?

Jay Blanchard jay.blanchard at niicommunications.com
Thu Sep 26 09:29:01 CDT 2002


[snip]
You can have as many buttons on a form as you'd like.  If you are using the
typical <input type="submit"> then the name/value pair of the clicked submit
button will be passed to the post.  The other submit buttons will not have
their name/value pairs passed in the post.
[/snip]

But the form action is the same. I guess I could all of the PHP code in a
huge case statement and then choose the action as I have done before. I was
wanting the action choice to be made differently, but I know that cannot be
done. I wanted it done somehow in the form itself, which could be done with
JavaScript if need be.

<form action="whatever1" method="POST"> if one button clicked.
<form action="whatever2" method="POST"> if another button was clicked.

I don't know how I got it in my mind this morning that it could be done in
the HTML. It must be CRS disease...

Thanks!

Jay





More information about the thelist mailing list