Close modal on save

Is there a way to configure the close modal on save behaviour.

When in insert mode I would like to keep the modal open on save but when save is pressed load the update form in place of the insert form.

This would allow a user to create an initial record then keep the modal open for subsequent updates rather than creating more new records.

Possible?