0

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.

1 Answer 1

9

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.