Checkbox_boolean option is not checked in edit mode

I am using a checkbox_boolean field to get the status.

->fieldType(‘card_received’, ‘checkbox_boolean’)

If I check the checkbox while adding, it gets saved correctly in database. But, when I view this in edit mode, it always shows un-checked. Is it a bug or I am missing something?

Hello @kapilchugh and welcome to our forums :hugs:,

From what I remember checkbox_boolean was a bit buggy that’s why I removed it for now for version 3. Now I remember that this issue was only occurring when the database field type was boolean. Can you please check your database field type and change it to TINYINT instead to see if this will work.

If you need to have the boolean as a mySQL field type then unfortunately from my investigation I couldn’t find any solution as it is probably something weird that it is happening at the background that I am not aware of.


Hey @johnny
Thanks for your reply!

I am already using TINYINT(1). In fact PHPMyAdmin automatically converts Boolean type to TINYINT.