Good Morning,
I work with zend framework (php) and I see in var_dump
the value of an option to a select after I send a POST request.
code :
<div class="entry">
<form action="<?php echo $this->escape($this->form->getAction()); ?>" method="<?php echo $this->escape($this->form->getMethod());?>">
<h2 class="selectVisibility">Seleziona la stagionalità :
<select name="cambiaStagionalita">
<option value="ND"></option>
<?php foreach ($this->seasons as $season) :
$from = new Zend_Date($season['from']);
$until = new Zend_Date($season['until']);
?>
<option value="<?php echo $season['from'];?>"> Dal <?php echo $from->toString(Zend_Date::DAY_SHORT. " " .Zend_Date::MONTH_NAME. " ".Zend_Date::YEAR);?> al <?php echo $until->toString(Zend_Date::DAY_SHORT. " " .Zend_Date::MONTH_NAME. " ".Zend_Date::YEAR);?></option>
<?php endforeach; ?>
</select>
</h2> <div></div><br/>
<input type="submit" name="public" value="Cerca"/>
Code php action from controller :
$form = new Application_Form_Hotel_Costs();
$form->createForm2($seasons, $rooms, $mealPlans);
var_dump($form->getValue("cambiaStagionalita"));
//exit(0);
Var_dump
returns null .why? The option value is identical to db field.Help !