© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•9mo ago•
1 reply
pabloivme

Livewire form field not included in parent form's data

Hi, I have a big form with several repeaters, and each repeater has several fields, and it's got so big that, whenever an update occurs, it takes up to 2 seconds. I have moved the repeaters into individual Livewire component fields. The issue I'm having is that the data is not accessible from the main form upon submission.

To simplify the question, I'm going to use this test form:

public function form(Form $form): Form
{
    return $form->schema([
        Forms\Components\TextInput::make('name'),
        Forms\Components\Livewire::make(NestedField::class),
    ]);
}
public function form(Form $form): Form
{
    return $form->schema([
        Forms\Components\TextInput::make('name'),
        Forms\Components\Livewire::make(NestedField::class),
    ]);
}


And this Livewire component:

class NestedField extends Component implements HasForms
{
    use InteractsWithForms;

    public ?array $data = [];

    public function mount(): void
    {
        $this->form->fill();
    }
    
    public function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\TextInput::make('nested_input'),
            ])
            ->statePath('data');
    }
class NestedField extends Component implements HasForms
{
    use InteractsWithForms;

    public ?array $data = [];

    public function mount(): void
    {
        $this->form->fill();
    }
    
    public function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\TextInput::make('nested_input'),
            ])
            ->statePath('data');
    }

....

I'm rendering both blades with {{ $this->form }}.

The result of this code is that both fields get rendered correctly within the same form, their wire:model are: 'data.name' and 'data.nested_input', BUT upon submission, only 'name' is received:
array:1 [
  "name" => "Demo name"
]
array:1 [
  "name" => "Demo name"
]


I've been playing around with ->statePath in different places and things like that but I had no luck. Does anyone know if this is possible at all?
Alternatively I would want to fetch both forms on submission and merge them.
Thanks
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

Validate form data in custom Livewire form
FilamentFFilament / ❓┊help
3y ago
form field not resetting + update data
FilamentFFilament / ❓┊help
2y ago
Help accessing parent form field value
FilamentFFilament / ❓┊help
3y ago
Form in livewire component empty data on create
FilamentFFilament / ❓┊help
2y ago