I don't know any way of doing this through the admin generator. I
tried adding the parameters 'default' and 'value' to a field (thinking
these would be the obvious ways to do this if it were possible), but
neither worked.
You could always override the following function in your generated
actions file. In my example, my object name is Constant
protected function getConstantOrCreate($id = 'id')
{
if (!$this->getRequestParameter($id))
{
$constant = new Constant();
// set default constant name to 'default name'
$constant->setName('default name');
}
else
{
$constant = ConstantPeer::retrieveByPk($this-
>getRequestParameter($id));
$this->forward404Unless($constant);
}
return $constant;
}
On Dec 25, 4:10 pm, Atif Khan <[EMAIL PROTECTED]> wrote:
> Hello there, I am trying to use the admin generator
>
> I am trying to create a new account (module) from a customer (module)
>
> I have a custom object link from customer.
>
> When I click on it I get a blank form. Is there a way to pre populate some
> of the fields in the form.
>
> I think my syntax might be incorrect.
>
> Thanks
> Atif.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" 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/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---