© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•4mo ago•
4 replies
Jon Mason

Argument #1 ($form) must be of type Filament\Forms\Form, Filament\Infolists\Infolist given

It's been a few months since I've done any Filament dev work and I'm back in it and running into this error when trying to add a form to a Page class. I feel like I've run into this before and it was some little quirk that was causing the issue.

use Filament\Forms\Form;
use Filament\Pages\Page;
use Filament\Actions\Action;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Actions\Concerns\InteractsWithActions;

class MyPage extends Page implements HasForms, HasActions
{
    use InteractsWithForms, InteractsWithActions;

    public ?array $formData= [];

    public function form(Form $form): Form
    {
        return $form->schema([
            //form fields
        ])->statePath('formData');
    }
}
use Filament\Forms\Form;
use Filament\Pages\Page;
use Filament\Actions\Action;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Actions\Concerns\InteractsWithActions;

class MyPage extends Page implements HasForms, HasActions
{
    use InteractsWithForms, InteractsWithActions;

    public ?array $formData= [];

    public function form(Form $form): Form
    {
        return $form->schema([
            //form fields
        ])->statePath('formData');
    }
}


in my view I'm doing
{{ $this->form }}
{{ $this->form }}


I feel like I'm doing everything right, but I can't seem to figure out what's going on.
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

Argument #1 ($values) must be of type array, string given
FilamentFFilament / ❓┊help
3y ago
getUrl Argument #1 $parameters must be of type array, string given.
FilamentFFilament / ❓┊help
2y ago
get_class(): Argument #1 ($object) must be of type object, null given Filament::auth()
FilamentFFilament / ❓┊help
2y ago
Filament\Pages\BasePage::getInfolist(): Argument #1 ($name) must be of type string, null given
FilamentFFilament / ❓┊help
3y ago