Dependent select without parent being saved to the database
I have a simple form based on a
WorkOrder
. A WorkOrder
belongs to an Equipment
. An Equipment
belongs to a Location
. Therefore, a WorkOrder
belongs to a location through an Equipment
.
I have a dependent select working for the most part:
My problem is on form hydration though when editing the WorkOrder
. Since there is no location_id
on the WorkOrder
table, it obviously doesn't fill the location. I need to somehow fill the location based on the selected equipment instead and that's where I'm stuck. Any ideas?4 Replies