-- David Ulrich <[EMAIL PROTECTED]> wrote
(on Sunday, 31 August 2008, 07:50 PM +0200):
> 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.
This is noted in the manual, and the defined behavior of ComboBox.
Please see the Dojo manual for more details.
> 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’
> =>’post’));
>
> $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.
--
Matthew Weier O'Phinney
Software Architect | [EMAIL PROTECTED]
Zend Framework | http://framework.zend.com/