I have a form created using Symfony forms.
and in the template I have this selectbox displayed on the page using the render method.
<?php echo $form['field']->render() ?>
Can I set the selected option for this selection box?
Or does it need to be done in the class that creates this form? There is a field creation:
public function configure() { $this->widgetSchema['field'] = new sfWidgetFormSelect( array("choices" => array('1' => 'test1','2' => 'test2') ) ); }
source share