views:

209

answers:

3

Hello How can I make hidden multi checkbox in zend form?

A: 

This "could" work. Iam not on my dev machine in the moment

$box = new Zend_Form_Element_Checkbox('checkbox');
// set view helper to render, to formHidden
$box->helper = 'formHidden';
ArneRie
I think this hide form ! not only checkbox
Behrang
take a look on Zend_Form_Element_Hidden, this uses altough this helper
ArneRie
A: 

Using the Zend_Form_Decorator, set the css class of the item in question to hidden and in the stylesheet create a style and set the display property to hidden.

Brandon_R
+2  A: 

Building on Brandon_R:

In your form:

$hiddenBox = new Zend_Form_Element_Checkbox('hidden', array(
    'class' => 'hideMe'
));

In your css:

input.hideMe{ display: none; }
Johrn
easy way and userfull
Behrang