Okie doke:

<div class="purposes form">
<?
    echo $ajax->form('purposes','post',array(
                        'model'=>'Purpose',
                        'update'=>'purposesData',
                        'url'=>array(
                            'controller' => 'purposes',
                            'action' => 'add',
                            'admin' => 1,
                        )
                    ));
    echo $form->input('name');
    echo $form->input('desc');
    echo $form->input('layerrules',
        array(
            'label'=>'Allow in Layer rules?',
            'checked'=>true
        )
    );
    echo $form->input('kit_id',
        array('type'=>'hidden',
            'value'=>$kitid));
    echo $this->renderElement('all/btmbuttons');
    echo $form->end('purposes');
?>
</div>
/* End of views/purposes/add.ctp Code */

Then all/btmbuttons is where the submit/cancel buttons are.
/* Bottombtns currently: */
    <input name="Submit" value="submit" type="submit">
    <input name="Cancel" value="cancel" type="submit">
/* End of bottombtns rendered Element */


On May 18, 10:26 pm, John Andersen <j.andersen...@gmail.com> wrote:
> Please show the code in which you create the buttons, together with
> the surrounding form code!
> Then we may be able to assist you :)
>    John
>
> On May 19, 2:11 am,Nancy<nancy.milli...@gmail.com> wrote:
>
> > So, I added a submit and a cancel button to my ajax form and it
> > doesn't matter which you press, it always returns the submit button,
> > not the cancel.
>
> > The view code has this at the bottom (I stopped using helpers to see
> > if raw HTML would help, it didn't):
> >     <input name="Submit" value="submit" type="submit">
> >     <input name="Cancel" value="cancel" type="submit">
>
> > In the controller (admin_edit) function, I'm dumping out the contents
> > of $this->params['form'] and it always shows
>
> > Array
> > (
> >     [Submit] => submit
> > )
>
> > Even if you press the cancel button.  Am I doing something wrong?
>
> > Thanks!
>
> >Nancy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to