How to add multicheckbox element to form

Hi.
I’m trying to use addElementToEditGroup to add a multiple checkbox to a form.
Here’s the code I’m using:

$form->addElementToEditGroup(
            'multicheckbox', 
			'recipients',
            array(
                'id' => 'email_users-recipients',
                'value_options' => array(
					'0' => 'Apple',
					'1' => 'Orange',
					'2' => 'Lemon'
				),
                'label' => __('Recipients'),
                'description' => __('The email recipients.')
            )
        );

For some reason, I get an error:

Zend_Loader_PluginLoader_Exception

Plugin by name 'Multicheckbox' was not found in the registry; used paths:
Omeka_Form_Element_: Omeka/Form/Element/
Zend_Form_Element_: Zend/Form/Element/

If I try any other control name (text, checkbox, etc.), it works fine; and multicheckbox seems to be a valid element name.

So, any idea about what I’m doing wrong here?

Thanks.

So, it looks like the correct spelling for the name is MultiCheckbox (not sure of the reason for the capital letters, when all other control names are lowercased, and the docs page Understanding Form Elements — Omeka 2.7 documentation is showing the name also lowercased).

Problem is the error message has disappeared, but the control is not showing up (label and description are). Any idea?

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.