Create related record inside infolist
How can I create a record of another model inside a infolist using an action button?
I have a infolist in my "BookingResource", I want that button to create a "Invoice" (Booking and Invoice are related), how can I do that? with a modal if possible.
I'm trying to do something like this but it's not working:
The motive is that I need the booking to have a invoice featured before I can complete the booking, if there's a better a way to do this, let me know
I have a infolist in my "BookingResource", I want that button to create a "Invoice" (Booking and Invoice are related), how can I do that? with a modal if possible.
I'm trying to do something like this but it's not working:
The motive is that I need the booking to have a invoice featured before I can complete the booking, if there's a better a way to do this, let me know
Solution
ok, I've made an Action like this:
in that
The problem was that I didn't want to make different forms for the same thing, so now I have only one form that I can make a few changes if I pass that param
in that
getForm method, I've added a param to prevent relationship errors by hiding some fields.The problem was that I didn't want to make different forms for the same thing, so now I have only one form that I can make a few changes if I pass that param