if you set in $this->data['Model']['field']
then the html helper will add the value to the field
you can use $html->tagValue('Model/field'); if you need the default  
data for something else.

so in your add form for example

function add()
{
        if(empty($this->data)
        {
                $this->data['Model']['field1'] = 'default for field1';
        }
        else.....
        // form has posted
}

now in the view $html->input('Model/field1);  the default value will  
be "default of field1"


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

Reply via email to