2008年12月27日星期六

[fw-mvc] Another Zend_Form checkboxes bug ?

Hello everyone !

I'm having a little problem with checkboxes, I'm using this element :
  
    // ACCEPT CONDITIONS
         $this->addElement(
                    'CheckBox',
                    'contract',
                    array(
                        'label'        => 'I accept the terms of service',
                        'style'            =>'margin-left:100px;',
                        'required'   => true,
                        'checkedValue' => '1',
                        'validators'     =>  array(array('NotEmpty', true)),
                    )
                );
       
I need my users to check the checkbox before the can submit the form, but actually it's not the case. Checking the checkbox is not required to validate the form despite what I wrote (require => true) and the form subimts

Is this a bug ? I saw there was a lot of bugs in the checkbox form elements so this might be a new one. Or is this me doing somehting wrong ?
JA.

没有评论: