© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•14mo ago•
1 reply
taz

multiple filtersForm on a custom Livewire page

Is it possible to define multiple filtersForm on the same page.
It like to use it in my view like this {{ $this->secondFiltersForm }} in another place in the template.

The view
<div class="flex flex-col gap-y-4">
    <div>
        {{ $this->filtersForm }}
    </div>
    <div>   @livewire(\App\Filament\Widgets\TeamOverviewWidget::class, (property_exists($this, 'filters') ? ['filters' => $this->filters] : []))
    </div>
    <div>
        @livewire(\App\Filament\Widgets\GlobalIncomeChart::class, (property_exists($this, 'filters') ? ['filters' => $this->filters] : []))
    </div>
<div class="flex flex-col gap-y-4">
    <div>
        {{ $this->filtersForm }}
    </div>
    <div>   @livewire(\App\Filament\Widgets\TeamOverviewWidget::class, (property_exists($this, 'filters') ? ['filters' => $this->filters] : []))
    </div>
    <div>
        @livewire(\App\Filament\Widgets\GlobalIncomeChart::class, (property_exists($this, 'filters') ? ['filters' => $this->filters] : []))
    </div>

class Dashboard extends Page implements HasActions, HasForms
{
    use InteractsWithActions;
    use InteractsWithForms;
    use BaseDashboard\Concerns\HasFiltersForm;

    protected static string $view = 'filament.pages.dashboard';

    public function filtersForm(Form $form): Form
    {
        return $form
            ->schema([
                Section::make()
                        Select::make('income')
                            ->native(false)
                            ->selectablePlaceholder(false)
                            ->options([
                                'gross' => 'Gross',
                                'net' => 'Net'
                            ])
                            ->default('gross'),
                 
    }
class Dashboard extends Page implements HasActions, HasForms
{
    use InteractsWithActions;
    use InteractsWithForms;
    use BaseDashboard\Concerns\HasFiltersForm;

    protected static string $view = 'filament.pages.dashboard';

    public function filtersForm(Form $form): Form
    {
        return $form
            ->schema([
                Section::make()
                        Select::make('income')
                            ->native(false)
                            ->selectablePlaceholder(false)
                            ->options([
                                'gross' => 'Gross',
                                'net' => 'Net'
                            ])
                            ->default('gross'),
                 
    }
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

Livewire custom page
FilamentFFilament / ❓┊help
3y ago
CheckboxList Issue on Custom Livewire page
FilamentFFilament / ❓┊help
2y ago
Rendering custom livewire page on a modal view
FilamentFFilament / ❓┊help
2y ago
Custom Page without Livewire
FilamentFFilament / ❓┊help
3y ago