Dependant select in modal form
hi have my main form, from here i have 2 selects one for Brand and one for Item
when i select the Brand (for example Roland) i have the Item select populated with all the Roland instruments
but i can also create new Instrument from here.
A modal form is opened and i create the instrument
Now the difficult part
I want this behaviour
- select the brand in the main form (ok)
- open the modal for creating a new instrument (ok)
- here i have this fields: name, model, BRAND, type
BRAND should be pre-populated with the brand selected in the main form
The code (attached)
```
7 Replies
i have this line
->default(fn (Livewire $livewire) => $livewire->data['brand_id'])
but it doesnt works
i get this error
on top i have
use Filament\Forms\Components\Livewire;



should be

Solution
Thanks! It works!!! 🙂