Thanks Nate I originally thought that 'url' replaced action, but couldn't get it to work that way in practice, e.g.;
$form->create('Model', array('url'=>'/'.$myKey.'/admin/controller/ action/'.$myId)) translates to: <form id="ModelEditForm" url="/myKeyValue/admin/controller/action/ myIdValue" method="post" action="/admin/myKeyValue/controller/action/ myIdValue"> Note the 'admin' has moved to the middle of the URL (which breaks my routes expecting to see :myKey at the beginning), the form id has 'Edit' in the middle (which plays havoc with my JavaScript) and 'url' is displayed which (I don't think) is not a valid attribute for 'form' - OK I'm being niggly now :) Specifying both (for now) seems to do the trick. ~GreyCells On Mar 16, 2:53 pm, "nate" <[EMAIL PROTECTED]> wrote: > Oh, to further clarify, you don't need to specify *both* 'action' and > 'url'. Just use 'action' if you are only specifying a controller > action, and going with the default options for the rest of the URL > (i.e. controller). Use 'url' if you are specifying a completely > custom URL, i.e. '/your/form/action'. Also remember that 'url' works > with array-based URLs as well. > > On Mar 16, 10:23 am, "GreyCells" <[EMAIL PROTECTED]> wrote: > > > For those of us that are using/testing 1.2 bleeding edge, where you > > used to specify: > > > $form->create('MyModel', array('action'=>'/your/form/action')); > > > You now need to specify: > > > $form->create('MyModel', array('action'=>'/your/form/action', 'url'=>'/ > > your/form/action')); > > > to stop your custom action being overwritten. > > > I think this change happened around r4617, so if all your custom > > routes and auth suddenly fail, check this first :) > > > I've not created a ticket yet, because FormHelper appears to be > > undergoing some major changes (as you would expect) & is also raising > > a couple of php notices (for undefined 'id' and 'value'). If you'd > > like a ticket, let me know. > > > ~GreyCells --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---