I create a Zend_Dojo_Form with ComboxBox, DateTextbox,etc… Everything works
fine except ComboxBox.

When I post my form, I had labels instead values.

 

I created my form like that :

 

class my_Form_Theme extends my_Form

{

   protected $type=array('01'=>'Promo','02'=>'Thème
HomePage','03'=>'Thème');

    

    public function init()

    {

      /* Définition du formulaire */

 
$this->setAttribs(array('name'=>'form_Theme','id'=>'form_Theme',’method’=>’p
ost’));

        $this->setAction('/theme/save')

        ->addElement('ComboBox', 'TH_TYPE', array(

            'label' => 'Type :',

            'autocomplete'=>false,

            'value'=>'0',

            'multiOptions'=>$this->type,

            'required' => true,

            'onChange'=>"setValue('resultat', arguments[0]);"

…

 

And this is the result in my html page :

 

<dt><label for="TH_TYPE" class="required">Type :</label></dt>

<dd>

<select name="TH_TYPE" id="TH_TYPE" onChange="setValue('resultat',
arguments[0]);">

    <option value="01" label="Promo">Promo</option>

    <option value="02" label="Thème HomePage">Thème HomePage</option>

    <option value="03" label="Thème">Thème</option>

</select></dd>

 

It should post TH_TYPE=01 but I have TH_TYPE=Promo in $_POST.

 

David Ulrich

 

Reply via email to