1

I'm looking to do the equivalent of

    $element->addMultiOption('value', 'text');

which works for multi select dropdowns.

I can't seem to figure the equivalent is fro multi checkboxes.

2 Answers 2

1

try something like this:

$multichekboxElement = new Zend_Form_Element_MultiCheckbox("name_for_your_multicheckbox");
$multicheckboxElement->addMultiOption(1,'text-1');
$multicheckboxElement->addMultiOption(2,'text-2');
$multicheckboxElement->addMultiOption(3,'text-3');
$multicheckboxElement->addMultiOption(4,'text-4');

Then you just have to add the *"multicheckboxElement" variable to your Form as normal.

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

1 Comment

how do you add a title to the checkbox element?
1

Their is no difference between

 $element->addMultiOption('value', 'text');

For multiCheckbox elements and multiselect elements. Error was cause elsewhere

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.