I have an application where an authenticated user can push a button to show a modal. The modal prompts the user to select which version of an application they want to fill out (versionA or versionB). Upon selecting one of the options, a draft record is created and they are redirected to the edit view for that form. Happy path, life is good.
Now if the user has already created one of these forms, they are not allowed to create another one. Instead they need to edit their existing application or delete their old application and there is a process for completing this task on the same page.
What I want: When the user tries to create a second new application by clicking the buttons for application versionA or versionB, it should close the existing modal and open another modal explaining that they need to edit their existing record or delete their existing record before creating a new one.