Re: [symfony-users] Re: Form help

2010-04-14 Thread MatZ
class siteNoticiaForm extends BasesiteNoticiaForm { public function configure() { $this->setWidget('sf_guard_user_id', new sfWidgetFormInputHidden()); $this->setDefault('sf_guard_user_id', $this->getOption(sfContext::getInstance()->getUser()->getGuardUser()->getId())); unset($this['crea

[symfony-users] Re: Form help

2010-04-14 Thread fRAnKEnSTEin
Maybe this help a bit: Assuming the field you talk about "author field" is a select widget in the form you can set its default value in the options section of the widget, to get the logged user, use something like: class myUser extends sfGuardSecurityUser { public function getUserId() {