Hi Zend fans :)

I have tried to solve validating array of checkboxes:

This is part of my form (generated by formCheckbox Helper):

<p>
    <label for="Google">Google</label>
    <input type="hidden" name="se[Google]" value="0" />
    <input type="checkbox" name="se[Google]" id="Google" value="1"/>
    <label for="Seznam">Seznam</label>
    <input type="hidden" name="se[Seznam]" value="0" />
    <input type="checkbox" name="se[Seznam]" id="Seznam" value="1"/>
</p>

I don't know how to check (with Zend_Filter_Input) if at least one checkbox
is checked

   $validators = ....

   $filterInput = new Zend_Filter_Input(null, $validators);
   $filterInput->setData($this->_request->getPost());

Or have you better idea how to build this form?

Thx... and sorry for my english
-- 
View this message in context: 
http://www.nabble.com/How-to-validate-array-of-checkboxes--tf4712737s16154.html#a13470912
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to