Zend Form: Checkbox element displays as hidden field?

后端 未结 6 1849
春和景丽
春和景丽 2021-02-20 08:34

I would like to add a simple check box to my form:

$element = new Zend_Form_Element_Checkbox(\'dont\');
$element->setDescription(\'Check this box if you don\\\         


        
6条回答
  •  太阳男子
    2021-02-20 09:22

    I'm just coming across the hidden element for checkboxes myself. I don't have a solution for the post but want to add in my thoughts about the hidden field. This is so if the user does not check the box off a value of 0 is still passed. Otherwise the checkbox is not posted.

提交回复
热议问题