1👍
You should render the modal content from the server. When user clicks on the modal to create/update the object at that time you have to fire AJAX call for the updated modal content and update the modal content.
You should create a AJAX view which gives you a modal content.
Source:stackexchange.com