you can setDefault

$form->setDefault('dateRange', 'value');


On Thu, Nov 12, 2009 at 1:14 PM, Don_Busi <dominik.busin...@gmail.com> wrote:
>
> Hi everybody,
>
> I have an entity that (among other properties) has a "startDate" and
> an "endDate" property. Now I created a form widget that graphically
> shows the date range specified by these two dates.
>
> In my Form class I added my new custom form widget.
>
>>   public function configure()
>>   {
>>    ...
>>     $this->setWidget('dateRange', new stgSeasonWidgetFormInput());
>>    ...
>>   }
>
> and in my Template (showSuccess.php) I display the widget.
>
>> ...
>> <?php echo $form['dateRange']; ?>
>> ...
>
> How can I pass the two values (myObject->startDate & myObject-
>>endDate) into my custom widgets "render(...)"-function?
>
> Thanx a lot for you help in advance.
>
> Don_Busi
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to