On Mar 6, 7:39 am, Alan Bem <[email protected]> wrote:
> Look at this example:
>
> $this->setWidget('referer', new sfWidgetFormInputHidden());
> $this->setDefault('referer',
> sfContext::getInstance()->getRequest()->getReferer());
>


Sorry, but that doesn't work. The "setDefault" method is only
available in symfony 1.2. I'm trying to figure out how to do this in
symfony 1.1.7















>
> On Fri, Mar 6, 2009 at 1:16 PM, Lawrence Krubner 
> <[email protected]>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 [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to