F
Filament2mo ago
frame

HasWizard on a custom page

What do I need for a basic wizard on a custom page example? I tried the following but I'm getting Method App\Filament\Resources\GroupResource\Pages\GroupCustom::form does not exist.
use App\Filament\Resources\GroupResource;
use Filament\Forms\Components\TextInput;
use Filament\Resources\Pages\Concerns\HasWizard;
use Filament\Resources\Pages\Page;
use Filament\Schemas\Components\Wizard\Step;

final class GroupCustom extends Page
{
use HasWizard;

protected static string $resource = GroupResource::class;

protected string $view = 'filament.resources.groups.pages.group-custom';

public function mount(): void
{
//
}

protected function getSteps(): array
{
return [
Step::make('step 1')
->schema([
TextInput::make('field 1'),
]),
];
}
}
use App\Filament\Resources\GroupResource;
use Filament\Forms\Components\TextInput;
use Filament\Resources\Pages\Concerns\HasWizard;
use Filament\Resources\Pages\Page;
use Filament\Schemas\Components\Wizard\Step;

final class GroupCustom extends Page
{
use HasWizard;

protected static string $resource = GroupResource::class;

protected string $view = 'filament.resources.groups.pages.group-custom';

public function mount(): void
{
//
}

protected function getSteps(): array
{
return [
Step::make('step 1')
->schema([
TextInput::make('field 1'),
]),
];
}
}
<x-filament-panels::page>
{{ $this->form }}
</x-filament-panels::page>
<x-filament-panels::page>
{{ $this->form }}
</x-filament-panels::page>
Solution:
🤔 I'll use CreateRecord instead of Page
Jump to solution
2 Replies
Barbara B
Barbara B2mo ago
Does you GroupResource class has a form method?
Solution
frame
frame2mo ago
🤔 I'll use CreateRecord instead of Page

Did you find this page helpful?