post by kapilchugh on Mar 17, 2023

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?

post by johnny on Mar 19, 2023

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.

Regards
Johnny

post by kapilchugh on Mar 19, 2023

Hey @johnny
Thanks for your reply!

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

1 / 3
Mar 2023