I think you should call the render function and overgive the value as  
the second parameter. E.g.
  $w = new sfWidgetFormTextarea();
  echo $w->render('the_name', 'the_value_of_the_textarea');

The second parameter in the constructor you used just adds stupidly  
any html attributes you specify. So if you have an element called  
'value' in your array it adds a value-attribute.

Am 01.09.2009 um 13:09 schrieb Mark Smith:

>
> Hi,
>
> I am contructing a text area widget inside the configure method of my
> form like this:
>
> $this->setWidget("Notes", new sfWidgetFormTextarea(array(),array
> ('value'=>$this->entity->Notes)));
>
>
> In the template when I try to print out the widget like this:
>
> <?php echo $form['Notes']; ?>
>
> The resulting html is:
>
> <textarea id="form_Notes" name="form[Notes]" value="my notes, hello
> world!" cols="30" rows="4"/>
>
> For a textarea element the value goes between the opening and closing
> tags, not as an attribute like on input elements. The result for the
> user is the text area appears blank.
>
> Is this a bug in symfony? (I am currently on 1.2.0) Or is there
> another way I should be printing out this form field?
>
> Thanks
> >


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