© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
23 replies
SirAlyon

Help Needed with ToggleButtons in Filament Form

Hi everyone,

I'm struggling with an issue that I believe (and hope) has a simple solution. I have a custom Livewire component where I'm using the Filament 3 form.

Fieldset::make('Allocazione')
    ->schema([
        ToggleButtons::make('allocazione')
            ->label('')
            ->multiple()
            ->required()
            ->markAsRequired(false)
            ->options([
                'obbligazionaria' => 'Obbligazionaria',
                'prudente' => 'Prudente',
                'moderata' => 'Moderata',
                'azionaria' => 'Azionaria',
                'libera' => 'Libera',
            ])
            ->rules([new Allocazione])
            ->inline(),
    ])
    ->columnSpan(2),
Fieldset::make('Allocazione')
    ->schema([
        ToggleButtons::make('allocazione')
            ->label('')
            ->multiple()
            ->required()
            ->markAsRequired(false)
            ->options([
                'obbligazionaria' => 'Obbligazionaria',
                'prudente' => 'Prudente',
                'moderata' => 'Moderata',
                'azionaria' => 'Azionaria',
                'libera' => 'Libera',
            ])
            ->rules([new Allocazione])
            ->inline(),
    ])
    ->columnSpan(2),


The problem lies with the ToggleButtons. As you can see, I have 5 options. The first 4 (obbligazionaria, prudente, moderata, azionaria) can be selected freely, but they exclude the last one (libera) and vice versa.

I would like to disable "libera" as soon as one of the other 4 is clicked, and disable the other 4 as soon as "libera" is clicked.

I'm pretty sure this can be done. I've tried several methods, but none have worked properly. Could you help me out? Thanks!
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

Help Needed with Real-Time QR Code Display in Filament Form Modal
FilamentFFilament / ❓┊help
2y ago
Help Needed with Sorting an Accessor in Filament Table
FilamentFFilament / ❓┊help
2y ago
Help Needed with cursorPaginate in Filament Tables with Tabs and Filters
FilamentFFilament / ❓┊help
13mo ago
Custom Event interfering with Filament Notification. Help needed!
FilamentFFilament / ❓┊help
3y ago