Complex form
Hi!
I have a quite complex form
at some point, in this form i have a select (brand)
after i have item (create a new item)
7 Replies
as you can see, in the item
i have the ability to select an existing item or creating a new one
if i choose to create a new item, i have a field to select the related brand.
is it possible to automatically select the brand based on the brand select in the first part of the form?
I hope I was clear
choose brand here
and have the brand preselected automatically here
I have a feeling it might be possible but look into the methods o $livewire for say $livewire->parentRecord for instance
thanks
uhm.. i can't find a solution at the moment
Got it
uhm nope
Attempt to read property "brand_id" on null
$brandId = $livewire->record->brand_id;
solved with this
->default(fn (Livewire $livewire) => $livewire->data['brand_id'])