© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
Anish

Checkbox list

I am looking to provide default for a form with Checkbox list. I want two of them to be checked by default and two of them to be unchecked.

The code

CheckboxList::make('optional_courses')
     ->options([
          'PROB03' => 'Advanced Probability',

          'ANA03' => 'Advanced Analysis',

           'ER01' => 'Ergodic Theory',

           'DS01' => 'Descriptive Set Theory',

      ])
CheckboxList::make('optional_courses')
     ->options([
          'PROB03' => 'Advanced Probability',

          'ANA03' => 'Advanced Analysis',

           'ER01' => 'Ergodic Theory',

           'DS01' => 'Descriptive Set Theory',

      ])


I want first two to be checked by default and other two are unchecked. Although I have hard coded it, these options are coming from some other table, where the first two are recommended.

Thanks in advance for any help.
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Checkbox list
FilamentFFilament / ❓┊help
2y ago
checkbox list
FilamentFFilament / ❓┊help
2y ago
Checkbox list groups
FilamentFFilament / ❓┊help
6mo ago
Checkbox List Default
FilamentFFilament / ❓┊help
3y ago