Thanks and it works.

Just one more thing. I am totally frustrated with the documentation
available at api.cakephp.org . Do you guys have some other resource to
look to ?



On Dec 14, 10:41 am, grigri <[EMAIL PROTECTED]> wrote:
> $form->create('Model', array('url' => '...', 'default' => false));
>
> generates your form tag with onSubmit="event.returnValue = false;
> return false;", which is what you need
>
> On Dec 14, 2:15 pm, WordPress Guru <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello ,
>
> > I have a form that I am creating with form->create() , but I dont want
> > the form to be submitted as their is an ajax button in the form that
> > will [hopefully] submit the form. So I want to use onSubmit="return
> > false;" to stop the form from submitting.
>
> > I have tried the following,  that does not work.
>
> > echo $form->create('Model' , array('url'=>'/controller/action/'.
> > $id.'/' , 'onSubmit'=>'return false;') );
>
> > This was on the assumption that cake might be watching onSubmit inside
> > create method. Ahh that api. document is not worth much :(
>
> > Thanks in advance- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to