I believe that FormHelper will default to add action unless $this->data[ModelName]['id'] is set, in which case it will create an edit form.
Personally, I think it's best to just specify the action. It's only a few letters to type. Why make things difficult to understand at a glance when you (or, worse, someone else) come back 6 months later? On Wed, Feb 18, 2009 at 10:07 PM, Marcelo Andrade <[email protected]> wrote: > > On Wed, Feb 18, 2009 at 8:58 PM, Sidney <[email protected]> wrote: >> (..) > > @Sydney > > You are right. But I don't know if I was clear. If we have a > mycontrollers/dosomething.ctp view with a code like > > echo $form->create('Mycontroller'); > > we get a form for the add (or even the edit) action and not for a > dosomething action. I've asked if it couldn't make more sense if the > default action (when not specified in the $form->create) be the action > with the same name as the view instead of the add/edit action. > > In other words: isn't the form helper supposed to follow the Cake's > convention about the view name is the same as the action name > (at least by default)? > > Best regards. > > -- > MARCELO DE F. ANDRADE (aka "eleKtron") > Belem, PA, Amazonia, Brazil > Linux User #221105 > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
