Question

I tried:

$form->addElement(
    'select',
    'salutation',
    array(
        'required' => true,
        'options' => array(
            'Mr.' => 'Mr.',
            'Mrs.' => 'Mrs.',
            'Ms.' => 'Ms.',
        ), 
    )
);

Then I print_r()ed the form, and options for salutation are empty. Does anybody know the correct spell for that? As far as I see, there's no documentation for Zend element configs' format.

Was it helpful?

Solution

You should use 'multiOptions' instead of 'options'.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top