Using a wizard as a modal form

use Filament\Forms\Components\MarkdownEditor;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Forms\Components\Wizard\Step;
 
Action::make('create')
    ->steps([
        Step::make('Name')
            ->description('Give the category a unique name')
            ->schema([
                CheckboxList::make('technologies')
                    ->options($data),
            ])
            ->afterValidation(function () {
                // ...

                if (true) {
                    throw new Halt();
                }
            }),
        Step::make('Description')
            ->description('Add some extra details')
            ->schema([
                MarkdownEditor::make('description'),
            ]),
        Step::make('Visibility')
            ->description('Control who can view it')
            ->schema([
                Toggle::make('is_visible')
                    ->label('Visible to customers.')
                    ->default(true),
            ]),
    ])


How can I check if at least 1 element is clicked on the checboxlist. If nothing is selected the next button should be disabled. Atm halt only blocks you from going to the next button, but its not disabled.
Was this page helpful?