© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
18 replies
Bloom

How to combine Wizard and Builder form component

       return $form
            ->schema([
                Wizard::make([
                    Wizard\Step::make('Select Items')
                        ->schema([
                            Builder::make('content')
                            ->blocks([
                                Builder\Block::make('Add items')
                                    ->schema([
                                        Forms\Components\Select::make('item_id')
                                        ->relationship('item', 'item_name')
                                        ->required(),
                                        Forms\Components\TextInput::make('quantity')
                                        ->required()
                                        ->numeric(),
                                    Forms\Components\DatePicker::make('transfer_date')
                                        ->required(),
                                    Forms\Components\TextInput::make('notes')
                                        ->required()
                                        ->maxLength(255),
                                    ])
                        ])

                        ]),
                    Wizard\Step::make('Select Branch')
                        ->schema([
                            Forms\Components\Select::make('branch_id')
                            ->relationship('branch', 'branch_name')
                                ->required(),
                        ]),
                    ])->submitAction(new HtmlString(Blade::render(<<<BLADE
                    <x-filament::button
                        type="submit"
                        size="sm"
                    >
                        Submit
                    </x-filament::button>
                BLADE)))

            ]);
    }
       return $form
            ->schema([
                Wizard::make([
                    Wizard\Step::make('Select Items')
                        ->schema([
                            Builder::make('content')
                            ->blocks([
                                Builder\Block::make('Add items')
                                    ->schema([
                                        Forms\Components\Select::make('item_id')
                                        ->relationship('item', 'item_name')
                                        ->required(),
                                        Forms\Components\TextInput::make('quantity')
                                        ->required()
                                        ->numeric(),
                                    Forms\Components\DatePicker::make('transfer_date')
                                        ->required(),
                                    Forms\Components\TextInput::make('notes')
                                        ->required()
                                        ->maxLength(255),
                                    ])
                        ])

                        ]),
                    Wizard\Step::make('Select Branch')
                        ->schema([
                            Forms\Components\Select::make('branch_id')
                            ->relationship('branch', 'branch_name')
                                ->required(),
                        ]),
                    ])->submitAction(new HtmlString(Blade::render(<<<BLADE
                    <x-filament::button
                        type="submit"
                        size="sm"
                    >
                        Submit
                    </x-filament::button>
                BLADE)))

            ]);
    }
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Form Builder Component
FilamentFFilament / ❓┊help
2y ago
Form builder - Programmatically step with Wizard?
FilamentFFilament / ❓┊help
15mo ago
Form builder component properties render
FilamentFFilament / ❓┊help
3y ago
How to inject a livewire component into form builder?
FilamentFFilament / ❓┊help
3y ago