this should have been more obvious but echo $form->input('id', array("type" => "hidden","value" => $this->data ['Model']['id']));
solution made sure my edit form stayed an edit form and didn't lose it's parameters On Mar 27, 5:20 pm, JamesF <usaexportexpe...@gmail.com> wrote: > i am having the same problem withvalidationmaking me lose my action > parameters. > > still trying to figure out best way to pass back action parameter > after failedvalidation. > > On Mar 18, 12:08 pm, koala kid <alexhob...@gmail.com> wrote: > > > Thanks for your reply. > > > Myvalidationhas become a little more complicated since yesterday as > > I am trying to validate 1 field but that field belongs to related > > model. In that case where should I perform thevalidationand how > > would I pass the ID back most effectively. > > > On Mar 17, 8:50 pm, brian <bally.z...@gmail.com> wrote: > > > > On Tue, Mar 17, 2009 at 4:12 PM,koalakid<alexhob...@gmail.com> wrote: > > > > > Hi, > > > > > I am fairly new to cake and I'm making some fixes for a client on a > > > > CMS tool someone developed for them using cake. I am trying to add a > > > > customvalidationrule on one of the forms but if it fails the ID > > > > parameter in the URL is beinglostand theeditfails to update. > > > > > Do I have to explicitly pass the ID back along? > > > > I doubt thatvalidationhas anything directly to do with it. I'm > > > guessing youraction/method has an $id as a parameter and theform > > >actiondoes not include it. If you're using $form->create() can you > > > post that? Also the method itself. It's possible that it's being set > > > the first time around but, whenvalidationfails and theformis > > > re-displayed, the ID var isn't set again. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---