Hi,

I have a form with a combobox, I've set it up like this (class extends
Zend_Dojo_Form) :

$country = $this->createElement('ComboBox', 'country')
                        ->setLabel('lbl_country')
                        ->setAutoComplete(true)
                        ->setMultiOptions($this->getCountryList()))
                        ->setRequired(true);

The country list gives an associative array that looks like:

array(
    "af"=>"Afghanistan",
    "al"=>"Albania",
    "dz"=>"Algeria",
    ...
);

The combobox is shown correctly, autocompletion works, etc... In the
html source I see:

<select name="country" id="country">
    <option value="af" label="Afghanistan">Afghanistan</option>
    <option value="al" label="Albania">Albania</option>
    <option value="dz" label="Algeria">Algeria</option>
    ...
</select>

When I submit the form, I don't get the short value in $_POST, but the
long value:

$_POST = array('country'=>'Albania');

How can I get the short value "al" in the POST array instead of the long value?

Tnx
Jeroen

Reply via email to