Tuesday, May 12, 2015

Parse checkbox value to boolean

CakePHP3, no database

A checkbox value is automatically converted to 0 or 1. If I want to make an external request I manually have to cast the value. Is it possible to tell the FormHelper that checkbox values should be handled as boolean and not as tinyint?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: