Notification for unsaved data
Guys, I currently have an action in my edit without verification, I can modify the form without clicking save and clicking on the action and it will work, but it will not save the changes. It is possible, for example, to add a
->requiresConfirmation()
that when clicking on the action and not having saved the data, a message appears "you have unsaved data, do you want to continue anyway?" but the message only appears if the person clicked on the action, modified the form data and did not save it.
Example action:
2 Replies
I tried this, but it simply doesn't do what I expected. From what I tested, it worked when I changed pages or tried to exit the application, but in the action it didn't apply.
I also tried a redirect to another page but it doesn't activate the notification.
My action is in EditResource.
Does anyone have a suggestion?