Posted by Christoph Burschka on 04/27/07 14:44
misiek schrieb:
> Hi is it possible to have many submit buttons and those will submit the
> one form on different action ?
>
> for example
>
> <form id='form'>
>
> <textarea>TEST<textarea>
>
> <input type='submit' /* action='1'*/ >
> <input type='submit' /* action='2'*/ >
> <input type='submit' /* action='3'*/ >
>
> </form>
>
> Thanks
>
> --
> CakePHP
Not to different actions in the sense of different URLs to send the form
to, but it is possible to have several submit buttons and have the
destination page check which of them was pressed.
> <form id='form' method='post' action=''>
>
> <textarea>TEST<textarea>
>
> <input type='submit' name='op' value='Preview' />
> <input type='submit' name='op' value='Submit' />
> <input type='submit' name='op' value='Delete' />
$_POST['op'] will contain the value of the button that was clicked
(Preview, Submit or Delete).
--
cb
Navigation:
[Reply to this message]
|