How can I custom values with DoctrineModule\Form\Element\ObjectMultiCheckbox
?
I used Zend\Form\Element\MultiCheckbox
and I set values like this:
$this->add(array(
'type' => 'Zend\Form\Element\MultiCheckbox',
'name' => 'countries',
'options' => array(
'label' => 'Select countries',
'value_options' => array(
'value' => 1,
'label' => 'United Kingdom',
'continent' => 'Europe'
)
)
))
But now I need to use Doctrine 2 Multicheckbox
and I need to set custom value options. How can i do this?
I have currently only this:
$this->add(array(
'type' => 'DoctrineModule\Form\Element\ObjectMultiCheckbox',
'name' => 'countries',
'options' => array(
'object_manager' => $this->em,
'target_class' => 'Module\Entity\Country'
)
));
I need this for custom view render. I want to show countries like this:
Europe
- Sweden
- United Kingdom
- and others...
America
- Canada
- United States
- other countries...