To be honest, I agree - I too usually submit forms to the current
page, and always replacing the action from add/edit repetitive.
Convention over config and all that, and I find myself having to
configure it more often than I can rely on the convention.
On Jul 20, 7:48 pm, "Marcin Domanski" <[EMAIL PROTECTED]> wrote:
> you're crazy ;)
>
> On Sun, Jul 20, 2008 at 5:20 AM, Mathachew <[EMAIL PROTECTED]> wrote:
>
> [snip]> The action ends up being /users/edit/1. However, when I submit the
> > form and the validation says there was an error, the action is changed
> > to /users/add for the next form submission. Instead of the default
> > being either add or edit, why can't this function just default to the
> > current page and use something else when specified? Wouldn't that be
> > more logical?
>
> Do you have
> $form->input('id')
> in the form ? i'm pretty sure all baked views have it.
>
> > Another example of what seems to be improper behavior (or bad logic)
> > is /users/login. I go to that and it's /users/add. Ok, so let's
> > specify the url:
> [snip]
> > <?php echo $form->create('Users', '/login'); ?>
>
> <?php echo $form->create('Users', array('action' => 'login')); ?>
>
> HTH,
> --
> Marcin Domanskihttp://kabturek.info
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---