You must use the default or bind a value to your form, not render it with
the value attribute.

With default value :

public function configure()
{
  $this->setDefault('field_name', 'default value');
}

Or when binding :

$form->bind(array
(
  'field_name' => 'value'
));

Alexandre

2009/12/11 smellycat37 <[email protected]>

> Bonjour,
>
> j'ai un form
>
>    $this->setWidgets(array(
>      'product_id' => new sfWidgetFormDoctrineChoice(array('model' =>
> 'Product')),
>    ));
>    $this->getWidget('product_id')->setOption('order_by', array
> ('name', 'ASC'));
>
>    $this->setValidators(array(
>      'product_id' => new sfValidatorDoctrineChoice(array('model' =>
> 'Product')),
>    ));
>
>
> dans ma vue j'aimerai afficher le sfWidgetFormDoctrineChoice
> product_id dans ma vue en forçant la valeur... j'ai donc essayé de la
> même manière que pour un sfWidgetFormInput
> <?php echo($form['product_id']->render(array('value' => $value)); ?>
>
> Cela ne fonction pas...
>
>
> --
>
> 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]<symfony-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>
>


-- 
Alexandre Salomé
http://alexandre-salome.fr

--

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