-
-
Notifications
You must be signed in to change notification settings - Fork 3
[Bug]: Booleans are stored a strings #27
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
I'm currently working on beeing able edit (continue filling out) an existing entry, and I noticed that in the entry data, bools for checkboxes etc. are stored as strings and not bools; for example:
{"type":"Toggle","field":"Toggle","answer":"false","field_id":23}instead of (in my opinion "correct" way):
{"type":"Toggle","field":"Toggle","answer":false,"field_id":23}This is the culprint i think:
| $valueData = (bool) $value ? 'true' : 'false'; |
Is this a bug or a feature? Is there a logic to this I don't see?
How to reproduce the bug
Create a form with a Checkbox or Toggle and look at the saved entry in the DB.
Package Version
PHP Version
8.4
Laravel Version
12
Which operating systems does with happen with?
No response
Notes
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working