© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
Zakhaev

FillForms not working on a custom page with multiple forms.

I got a custom page where i use multiple forms.
in the mount function i add a fillforms method.

    public function mount(): void
    {
        if (!isAssetManager() && !isManager()) {
            abort(404);
        }

        //Get the user
        $this->user = Filament::auth()->user();

        $this->profileData = [
            // 'id' => $user->id,
            'Naam' => $this->user->name,
            'Email' => $this->user->email,
            'Telefoonnummer' => $this->user->phone_number,

            // Add other properties as needed
        ];

        $this->fillForms();
    public function mount(): void
    {
        if (!isAssetManager() && !isManager()) {
            abort(404);
        }

        //Get the user
        $this->user = Filament::auth()->user();

        $this->profileData = [
            // 'id' => $user->id,
            'Naam' => $this->user->name,
            'Email' => $this->user->email,
            'Telefoonnummer' => $this->user->phone_number,

            // Add other properties as needed
        ];

        $this->fillForms();



Then i try to fill it but the toggle always stays false i dont know what im missing

    protected function fillForms(): void
    {
        $this->getAccountFormSchema->fill();
        $this->getDashboardFormSchema->fill();
        $this->getConnectivityFormSchema->fill(['mileage_request_service' => true]);
    }

    protected function getForms(): array
    {
        return [
            'getAccountFormSchema',
            'getDashboardFormSchema',
            'getConnectivityFormSchema',
        ];
    }
    protected function getConnectivityFormSchema(Form $form): Form
    {
        return $form
            ->schema([
                Toggle::make('mileage_request_service')
                    ->label('Kilometerstand ophalen doormiddel van online service')
                    ->reactive(),
            ]);
    }
    protected function fillForms(): void
    {
        $this->getAccountFormSchema->fill();
        $this->getDashboardFormSchema->fill();
        $this->getConnectivityFormSchema->fill(['mileage_request_service' => true]);
    }

    protected function getForms(): array
    {
        return [
            'getAccountFormSchema',
            'getDashboardFormSchema',
            'getConnectivityFormSchema',
        ];
    }
    protected function getConnectivityFormSchema(Form $form): Form
    {
        return $form
            ->schema([
                Toggle::make('mileage_request_service')
                    ->label('Kilometerstand ophalen doormiddel van online service')
                    ->reactive(),
            ]);
    }
Solution
Fixed the problem
Jump to solution
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

Multiple forms on custom page
FilamentFFilament / ❓┊help
3y ago
Multiple forms in custom page
FilamentFFilament / ❓┊help
3y ago
Multiple forms page
FilamentFFilament / ❓┊help
2y ago
Can't create custom page with multiple forms
FilamentFFilament / ❓┊help
2y ago