
Using custom model as input on post Ajax call
Hi,
Currently I use custom models on my post endpoint to retrieve form data. In the action on this endpoint I then can easily map the custom model properties to the properties of my target model.
To map the form input fields to my custom model I use the following name structure: custommodel-name[property-name]
Now I want to play with Ajax form post, and I have read about serializing form-data. But I was wondering if it is possible to still use the custom model approach on my post endpoint. If so, how can I map the form data to my custom model using the Ajax call.
Tnx!
Hi,
Currently I use custom models on my post endpoint to retrieve form data. In the action on this endpoint I then can easily map the custom model properties to the properties of my target model.
To map the form input fields to my custom model I use the following name structure: custommodel-name[property-name]
Now I want to play with Ajax form post, and I have read about serializing form-data. But I was wondering if it is possible to still use the custom model approach on my post endpoint. If so, how can I map the form data to my custom model using the Ajax call.
Tnx!
Login to reply