I have the below code.. then WHY is the field campaign_id not getting
populated with the default? Only works when I unhide it...
Thank you.
class AddressBookForm extends BaseAddressBookForm
{
public function configure()
{
unset(
$this['created_at'],
$this['updated_at'],
$this['organization_id'],
$this['is_active'],
$this['id']
);
$this->widgetSchema['campaign_id'] = new
sfWidgetFormInputHidden();
}
}
public function executeShow(sfWebRequest $request)
{
$this->campaign =
Doctrine::getTable('Campaign')->find(array($request->getParameter('id')));
$this->forward404Unless($this->campaign);
$this->form = new AddressBookForm();
$this->form->setDefault('campaign_id','1');
$this->address_books = $this->campaign->getAddressBook();
}
and a renderHiddenForm in the _form..
--
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.