helloise Posted December 10, 2010 Share Posted December 10, 2010 i have this code: abstract class BaseLpmServiceForm extends BaseFormPropel { public function setup() { $this->setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'name' => new sfWidgetFormInputText(), 'wap_home' => new sfWidgetFormInputText(), 'call_center_number' => new sfWidgetFormInputText(), 'catcher_id' => new sfWidgetFormPropelChoice(array('model' => 'LpmCatcher', 'add_empty' => false)), 'price_description' => new sfWidgetFormInputText(), 'logo' => new sfWidgetFormInputText(), 'invalid_msisdn_text' => new sfWidgetFormInputText(), 'terms_and_conditions' => new sfWidgetFormInputText(), 'service_code' => new sfWidgetFormInputText(), )); then i have this code in a form: <tr> <th><?php echo $form['catcher_id']->renderLabel() ?></th> <td> <?php echo $form['catcher_id']->renderError() ?> <?php echo $form['catcher_id']?> <?php //$catcher_id = $form['catcher_id']; //$catcher_id = $form->getObject()->getCatcherId(); $catcher_name = LpmCatcherPeer::retrieveByPK($form['catcher_id']->getValue('name')); echo $catcher_name." ".$catcher_id; if ($catcher_name = "zed-catcher") { echo $form['service_code']->renderLabel(); echo $form['service_code']->renderError(); echo $form['service_code']; } ?> </td> </tr> how do i get the selected value??? when i select a different value catcher_id and catcher_name does not change accordingly thanks Link to comment https://forums.phpfreaks.com/topic/221204-getting-selscted-value-in-drop-doen-list-in-symfony/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.