On Mon, Sep 14, 2009 at 12:56 PM, Whitty
<[email protected]> wrote:
> (..)
>  echo $form->input('Address.addr_id',array('options'=>
> $addresslist,'label'=>'Select Address'));
>
> How do I modify the above line to set the current address as the
> default?

You can pass the "value" or "default" attrib to your input.

echo $form->input('Address.addr_id',array('options'=>
$addresslist,'label'=>'Select Address', 'default'=> '0'));

But if $this->data is setted in the view, it's going to override
this default value.

Best regards.

--
MARCELO DE F. ANDRADE
Belem, PA, Amazonia, Brazil
Linux User #221105

http://mfandrade.wordpress.com

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to