Nice one!

On Fri, Feb 15, 2008 at 3:49 PM, francky06l <[EMAIL PROTECTED]> wrote:
>
>  If you define some default value in the database definition (not null
>  and a default), you can call $this->data = $this->Expense->create() in
>  controller prior to render the view. The default value defined in the
>  table will be used.
>  hth
>
>
>
>  On Feb 15, 6:14 am, duncan_m <[EMAIL PROTECTED]> wrote:
>  > Thanks.. I had a typo.. its working now :)
>  >
>  > I see that the view would be a better place for the logic. Thanks for
>  > that hint.
>  >
>  > Duncan.
>  >
>  > On Feb 15, 1:29 pm, Adam Royle <[EMAIL PROTECTED]> wrote:
>  >
>  > > This works for me in latest 1.2.
>  >
>  > > However, maybe this logic should be in your view??
>  >
>  > > echo $form->input('anotherfield', array('default' => 'A default
>  > > value'));
>  >
>  > > Cheers,
>  > > Adam
>  >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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