Racking my brains I have been through the zend documentation and crawled google but cant find the solution. I have a form using Zend_Form and on initial page load I need the contact me checkbox checked by default.
I have the below code which is suppose to work I am told but doesnt for me. Any one had any experience with this?
$contactme = new Zend_Form_Element_Checkbox('contactme','checked');
$contactme->setLabel("Please untick box if you don't want to be updated with offers.")
->setAttrib('checked','checked')
->setCheckedValue(1)
->setUncheckedValue(0)
->setValue(1);
Cheers
John
Is the way i do it. You can set in the array all other attributes too.