Create, Keep Open and Continue with Update

Is there any way to open a modal Create form, enable the user to save (this all works), but then not close the modal and allow them to continue to work and have it update instead?

Obviously, right now, because the view is linked to the Create view/controller action, every time the save button is pressed it creates a new entry in the db. Is there a way to switch the controller action after the first use of the Save button?

Try using widget pjax to reload container modal before insert a new record on database

Unless I’m misunderstanding your comment, I’m not looking to update the index. I want the modal window to perform the initial create action and then switch into update action for subsequent saves in the modal.

Basically, the user enters data in the modal and performs a save, initial commit to the db. The modal remains open and the user continues their entry and saves again, updating the record, … until which time they close the modal.

Right now, since they open the modal create view, every save creates a new record in the db. It switching the action from create to update that I’d need help with.

Yes try manager requestś from server in json format to manipulate container in modal before insert a new record into database and render other view…

Thank you for taking the time to help.

Would it be wrong to use the controller action to pass back (using JSON) the update route (Url::toRoute()) and then update the form action to this URL? I did a quick test and it seems to work. Just curious if this is an acceptable approach or if I should be doing things differently?

Is this what you were advising me to do?

Yes, if response from server it´s correct them send url from server to client in format JSON.