Skip to content

Instantly share code, notes, and snippets.

@kaiohken1982
Created December 22, 2011 14:36
Show Gist options
  • Save kaiohken1982/1510500 to your computer and use it in GitHub Desktop.
Save kaiohken1982/1510500 to your computer and use it in GitHub Desktop.
Zend Form Element Multicheckboxes unordered list tag ul
<?php
class My_Form_Template extends My_Form
{
public function init()
{
parent::init();
$this->addElements(array(
$this->createElement(self::TYPE_MULTICHECKBOX, 'checks', array(
'label' => 'Unordered Listed Checkboxes',
'title' => 'myboxes',
'validators' => array(),
'required' => true,
'separator' => '</li><li>',
'decorators' => array(
'viewHelper',
'Errors',
array(array('uno' => 'HtmlTag'), array('tag' => 'li')),
array(array('due' => 'HtmlTag'), array('tag' => 'ul','class' => 'check')),
),
'multioptions' => array(
'test2', 'prova2'
),
)),
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment