$model = $this->Model->find()
// data validation and save
if (empty($this->data)) {
$this->data = $model;
}
$this->set(compact('model));
you can now work with $model array in the view (contains all fields)
On 23 Feb., 21:34, Pekkle <juslin...@gmail.com> wrote:
> I have a table that i did two functions
>
> - the "add" form (7 fields)
> - the "modify" form (4 fields+3 fields uneditable (just echo them on
> screen)
>
> I am using the model validation... (thus it is impt for me to keep
> user-input after i prompt them for error
>
> BUT... Whenever i submit with errors for the modify form, the 3 fields
> (uneditable fields) just go missing, unless i put them in a in a form
> fields
>
> Is there a better way to do this, then to put them in form fields to
> retain the state?
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment