Try putting this in your controller:
$this->data['Property']['id'] = [your value here];
By filling $this->data in your controller, you enable cake to
"automagically" fill your forms. Cake doesn't understand the $property
var.
So, if you're doing something like this:
$property = $this->Property->findById(25);
simply change it to
$this->data = $this->Property->findById(25);
No need to $this->set() anything, and it _should_ work. ;-)
On Jul 4, 11:13 am, bmgz <[EMAIL PROTECTED]> wrote:
> I set('propery') in the controller but somehow the value field is
> turning up blank in the form
>
> <?php echo $form->hidden('Property.id'); ?>
> ...value=""...
> so I have to manually specify it:
>
> <?php echo $form->hidden('Property.id', array('value' =>
> $property['Property']['id'])); ?>
> ...value="520"...
>
> Is this normal? I thought the value field would be automagically
> filled in..
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---