I have 2 tables: Order(s) and Product(s). And I have a 3rd one that connects them: OrdersProducts. I would like to save several models at once into OrdersProducts like so:
I would like to select one single Order nr, and from a grid, select several products, adjust amounts and then save all.
My problem is, that I can't make it to show to the user in an appropriate manner if there is a validation error.
The best would be, to show it right there on the form, but I have no clue how to include the 3rd model into the form. I already have the form, and I can save several (or multiple) models at once, but if there is an error, for example: an amount is missing, I don't know how to tell it to the user.
Right now the save is finished, except the ones with errors, but this way the user would have to check all the time if all rows managed to be saved, what would be a nonsense.
The best would be to show the user right there on the form, highlight the problematic row in the grid (or any other way show that there is a problem with this or that particular row or field)
Does it make any sense? If yes, what can be a good (and simple...?) solution for this?
Thanks a lot! BR c