Jump to content

getting selscted value in drop doen list in symfony


helloise

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.