Can I add an import action to a wizard form

Wizard\Step::make('Students')
->icon('heroicon-o-academic-cap')
->schema([
Actions::make([
ImportAction::make(StudentImporter::class)
])
])
Wizard\Step::make('Students')
->icon('heroicon-o-academic-cap')
->schema([
Actions::make([
ImportAction::make(StudentImporter::class)
])
])
I have this at the moment, but when I load the page I get this error
PHP 8.1.29
10.48.20
Filament\Forms\Components\Actions::Filament\Forms\Components\{closure}(): Argument #1 ($action) must be of type Filament\Forms\Components\Actions\Action, Filament\Actions\ImportAction given
PHP 8.1.29
10.48.20
Filament\Forms\Components\Actions::Filament\Forms\Components\{closure}(): Argument #1 ($action) must be of type Filament\Forms\Components\Actions\Action, Filament\Actions\ImportAction given
https://flareapp.io/share/bP9oERM5
Flare
Filament\Forms\Components\Actions::Filament\Forms\Components{closure}(): Argument #1 ($action) must be of type Filament\Forms\Components\Actions\Action, Filament\Actions\ImportAction given - Occurred on URL http://mackillop.localhost:8000/onboarding
4 Replies
Jpac14
Jpac14OP4w ago
Bump Any ideas or help would be appreciated
awcodes
awcodes4w ago
Doesn’t appear that it’s possible since the Actions field is expecting a form component action which import action isn’t.
Jpac14
Jpac14OP4w ago
really there is no way around it, i want to have an import action for my onboarding workflow
awcodes
awcodes4w ago
Could possibly do it with a custom action. Upload the file and handle the import when submitting the action. Could potentially do it with a livewire component which has the import action and put it in the form with Livewire::make()
Want results from more Discord servers?
Add your server