以这种方式创建复选框
$is_conveyance_required = new Zend_Form_Element_Checkbox(FORM_CHECKBOX_PREFIX . 'is_conveyance_required', array());
$is_conveyance_required->addDecorators(array(
array('HtmlTag', array('tag' => 'label')),
array('Label', array('tag' => '')),
));
$is_conveyance_required->setValue(1);
$is_conveyance_required->setChecked( true );
$this->addElement($is_conveyance_required);
以及如何填充
$personal_form->populate($personal_data);
但是zend表单没有填充复选框......
<input type="checkbox" value="1" id="chk_is_conveyance_required" name="chk_is_conveyance_required">
这是 $personal_data 数组 img