i have the following 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=0;
$catcher_id = $form->getObject()->getCatcherId();
$catcher_name = LpmCatcherPeer::retrieveByPK($form['catcher_id']->getValue('name'));
echo $catcher_name;
if ($catcher_name = "zed-catcher")
{
echo $form['service_code']->renderLabel();
echo $form['service_code']->renderError();
echo $form['service_code'];
}
?>
</td>
</tr>
how can i get the selected value in the dropdown???
everytime i select a different name, the variable $catcher_name; stays the same..it does not change with every selection
please help
thnks
MOD EDIT: [noparse]
...
[/noparse] bbcode tags added; please use these tags in the future when posting PHP code.