What form inputs to use?

See attached image. How would you program a form like this in Filament Forms? When clicking on a day, two extra inputs (time from, time to) for selected day become visible. This should be saved in the database like this:
[
[
'day' => 'Monday',
'from' => '12:00',
'to' => '18:00',
]
// etc.
]
[
[
'day' => 'Monday',
'from' => '12:00',
'to' => '18:00',
]
// etc.
]
No description
3 Replies
biebthesecond
biebthesecond2d ago
You could combine then either using naming Checkbox('maandag.day'), Time('maandag.from), Time('maandag.to) Etc
biebthesecond
biebthesecond2d ago
But using a repeater (if that's what you need) or a Fieldset or Section using ->statePath() attribute could also work (https://filamentphp.com/docs/3.x/forms/layout/fieldset)

Did you find this page helpful?