© 2026 Hedgehog Software, LLC

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

Refresh Form With Dynamic Element Names

I have a form that I call from a relation manager. The form has two pieces - the first piece shows the current items in the order and allows customers to modify those selections. The second piece allows customers to make a new selection. When the customer submits the new item, I want the form to refresh and show the updated selections.

I can trigger the refresh using:
// action
->after(function ($livewire) {
  $livewire->dispatch('refreshModal');
}),

// relation manager
#[On('refreshModal')]
    public function refresh(): void
    {
        // unset the form
        unset($this->cachedForms['mountedTableActionForm']);
        // reload the form
        $this->cacheForm('mountedTableActionForm', null);
    }
// action
->after(function ($livewire) {
  $livewire->dispatch('refreshModal');
}),

// relation manager
#[On('refreshModal')]
    public function refresh(): void
    {
        // unset the form
        unset($this->cachedForms['mountedTableActionForm']);
        // reload the form
        $this->cacheForm('mountedTableActionForm', null);
    }


This process works for modifying a selection. However, when I try to use it for adding a new selection I get the error
Livewire Entangle Error: Livewire property cannot be found
Livewire Entangle Error: Livewire property cannot be found
. So there is a form section for the newly selected item but none of the values are filled in correctly. I define the form component using
Select::make('existingSelectionInfo.' . $existingSelection->id . '.mealId')
Select::make('existingSelectionInfo.' . $existingSelection->id . '.mealId')

So it is named dynamically. This might be more of a Livewire question than an issue with Filament. But basically my question is - how can I manipulate a value (
wire:model
wire:model
) that is not present when the form is initially loaded.

Thank you!
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

dynamic repeater fields names
FilamentFFilament / ❓┊help
17mo ago
Dynamic form with TextInput's
FilamentFFilament / ❓┊help
3y ago
RTL form element
FilamentFFilament / ❓┊help
15mo ago
Dynamic Form Component
FilamentFFilament / ❓┊help
2y ago