I agree that a link would be better in this case. But if you want to use a
button, you can give both buttons the same name ('name' => 'whatever') and then
check the value of the clicked button by inspecting
$this->params['form']['whatever'] in your controller and then react accordingly.
Jeremy Burns
Class Outfit
[email protected]
http://www.classoutfit.com
On 17 Mar 2011, at 11:09, Akeda Bagus wrote:
> On Thu, Mar 17, 2011 at 5:40 PM, heohni
> <[email protected]> wrote:
>> Hi,
>>
>> I want to have a button next to my submit button in order to go to
>> action 'index' onclick.
>> It should look like:
>> [Save] [Go back to index]
>>
>> Do I have a chance to add another button with 'action'=>'index' next
>> to the submit button?
>
> Submit button (input which type is submit) should be enclosed in a
> form, so you get the same action if you define
> two buttons within the same form. I prefer to use anchor or button
> element instead input element.
>
>
>
> --
> regards,
> gedex
>
> blog: http://gedex.web.id
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php