© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•6mo ago•
4 replies
23sergej

Action `fillForm` not working inside Repeater

After upgrade to V4
fillForm
fillForm
throws following error when used inside
Repeater
Repeater
:

Call to a member function getState() on null {"userId":1,"exception":"[object] (Error(code: 0): Call to a member function getState() on null at /var/www/html/vendor/filament/actions/src/Action.php:498
Call to a member function getState() on null {"userId":1,"exception":"[object] (Error(code: 0): Call to a member function getState() on null at /var/www/html/vendor/filament/actions/src/Action.php:498


Here is a short code example:
$schema
  ->components([
    Repeater::make('stores')
      ->schema([
        TextInput::make('name'),
        Actions::make([
          Action::make('locations')
            ->schema([TextInput::make('address')])
            ->fillForm(fn ($state) => dd($state))
        ]),
      ])
  ]);
$schema
  ->components([
    Repeater::make('stores')
      ->schema([
        TextInput::make('name'),
        Actions::make([
          Action::make('locations')
            ->schema([TextInput::make('address')])
            ->fillForm(fn ($state) => dd($state))
        ]),
      ])
  ]);


Same problem appears when using with
Builder
Builder


Everything works fine when action is used outside
Repeater
Repeater
, for example:
// Working example
$schema
  ->components([
    /** Repeater::make('stores') */
    /**  ->schema([ */
        TextInput::make('name'),
          Actions::make([
            Action::make('locations')
              ->schema([TextInput::make('address')])
              ->fillForm(fn ($state) => dd($state))
          ]),
    /**  ]) */
  ]);
// Working example
$schema
  ->components([
    /** Repeater::make('stores') */
    /**  ->schema([ */
        TextInput::make('name'),
          Actions::make([
            Action::make('locations')
              ->schema([TextInput::make('address')])
              ->fillForm(fn ($state) => dd($state))
          ]),
    /**  ]) */
  ]);
Solution
Found a solution. Replaced
fillForm
fillForm
with
mountUsing
mountUsing
.
Action::make('locations')
  ->schema([TextInput::make('address')])
  ->mountUsing(static function (Schema $schema, $state): void {
    $schema->fill([
      'address' => $state['valueFromState'] ?? '',
    ]);
  })
  // ->fillForm(fn ($state) => dd($state))
Action::make('locations')
  ->schema([TextInput::make('address')])
  ->mountUsing(static function (Schema $schema, $state): void {
    $schema->fill([
      'address' => $state['valueFromState'] ?? '',
    ]);
  })
  // ->fillForm(fn ($state) => dd($state))
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

repeater - anonymous action - fillForm
FilamentFFilament / ❓┊help
3y ago
livewire()->fillForm() not working
FilamentFFilament / ❓┊help
2y ago
URL not working in repeater action?
FilamentFFilament / ❓┊help
2y ago
Action inside modal is not working
FilamentFFilament / ❓┊help
2y ago