Re: Controller function parameter is lost

2008-10-29 Thread Dardo Sordi Bogado
Sorry, the first time I answered without reading thoroughly. Thomas is right you can post the user id and use that in your action. Anyway, that issue seems weird, have you set any custom routes? Try updating the core. On Tue, Oct 28, 2008 at 11:32 PM, R. Davila <[EMAIL PROTECTED]> wrote: > > Hi

Re: Controller function parameter is lost

2008-10-28 Thread R. Davila
Hi Thomas, The POST method is generated by $form->create() The GET method will put the variables in the URL (visible to the user), so that's not an option. $form->create() works for the add() and edit() scaffolded functions without problems. The problem is not the generated HTML, but when su

Re: Controller function parameter is lost

2008-10-28 Thread 703designs
You're using a POST method for your form, so you can retrieve the data from $this->data on the controller side. Why would you want POST data in a URL? That's what GET requests are for. Thomas On Oct 28, 6:43 pm, "R. Davila" <[EMAIL PROTECTED]> wrote: > Hi, > > Sorry, but it didn't work. > > This

Re: Controller function parameter is lost

2008-10-28 Thread R. Davila
Hi, Sorry, but it didn't work. This is what i did (following your example): create('User', array('url' => array('action' => 'changePassword', $form->value('User.id'; ?> And this was the generated html: Actually I had already tried something similar (hardcoding the parameter) and had

Re: Controller function parameter is lost

2008-10-28 Thread Dardo Sordi Bogado
Try create('User', array('url' => array('action' => 'changePassword', 3))); ?> I'm sure you'll be able to make it works for others ids than 3 ;) HTH, - Dardo Sordi. On Tue, Oct 28, 2008 at 12:30 AM, R. Davila <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a controller function, and the corres

Controller function parameter is lost

2008-10-27 Thread R. Davila
Hi, I have a controller function, and the corresponding view, setup like this: function changePassword($id = null) change_password.ctp create('User', array('action' => 'changePassword')); ?> hidden('password'); ?> . . Here I add the fields for old password, new password and retype new pass