Look at this example: $this->setWidget('referer', new sfWidgetFormInputHidden()); $this->setDefault('referer', sfContext::getInstance()->getRequest()->getReferer());
Cheers, Alan Gabriel Bem On Fri, Mar 6, 2009 at 1:16 PM, Lawrence Krubner <lkrub...@geocities.com>wrote: > > > I've tried this: > > $this->widgetSchema['date'] = new sfWidgetFormInputHidden(); > $this->widgetSchema['date']->setDefault(date("Y-m-d h:m:i")); > > but I get this error: > > Fatal error: Call to undefined method > sfWidgetFormInputHidden::setDefault() in /home/lawrence/public_html/ > bocahoops/lib/form/NewNewsForm.class.php on line 32 > > > So I tried this: > > $this->widgetSchema['date'] = new sfWidgetFormInputHidden(array(), > array("value", date("Y-m-d h:m:i"))); > > And that didn't work either. > > How do I set a default value on a hidden input? > > I'm using Symfony 1.1.7 > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---