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
078e32b
PHP Version
8.4
Laravel Version
12
Which operating systems does with happen with?
No response
Notes
No response
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:
Filament-Form-Builder/src/Livewire/FilamentForm/Show.php
Line 315 in 078e32b
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
078e32b
PHP Version
8.4
Laravel Version
12
Which operating systems does with happen with?
No response
Notes
No response