Last post Mar 09, 2017 04:10 PM by Dmitry Sikorsky
Mar 09, 2017 08:29 AM|Mostafa Sabeti|LINK
Mar 09, 2017 04:10 PM|Dmitry Sikorsky|LINK
I will try to help.
I would suggest trying something like this: when you render the view and render the inputs with name attribute they all will be then sent to the server on POST request. You may add one more hidden input and put the name of the model type (or some model ID)
as its value.
When user fills the form and executes POST request you, on the controller, will get it. You will have all the inputs values + the name of the type. Then you may manually create the model object of that type (using the reflection or manually with if/else)
and initialize from the request (you may get POST or GET values from the request object).