On Wed, Mar 11, 2009 at 12:55 PM, Paco Gomez <paco.gomez.ar...@gmail.com> wrote: > ... > > I don't know if it's possible to fill inputs fields of form in the > view automaticly from the dataTable Users
Yes, is possible, editing $this->data variable in the controller of the view. For example, you want fill the input User.username in view, then you will set the default data like: $this->data = array('User' => array('username' => 'defaultusername')); Check this code: function edit($id = null) { if (!empty($this->data)) { if ($this->User->save($this->data)) { //saved } } if (empty($this->data)) { //fill user data $this->data = $this->User->read(null, $id); } } -- Diego Caro A. Estudiante Ing. Civil Informática diegocaro | http://diego.bloog.cl "No tengo talentos especiales, pero sà soy profundamente curioso", Albert Einstein. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---