confirmation on page exit
Hello! Is there a way to show confirmation if the user tries to exit the create resource page? It would be useful if the user accidentally clicks the close button or any other link while filling up the create resource form.
5 Replies
Not at present
You can archieve this with custom JS, but then it will always be shown regardless of user input
Hi! I am really thankful for your reply. Can you please guide me to correct resource for custom js creation
You can register a JS file containing your code that check whether you are on a
/create/
url and include it via the Asset Facade: https://filamentphp.com/docs/3.x/support/assets#registering-javascript-filesThank you for your reply! I really appreciate it for you taking out time and replying me and many other budding developers like me! I have successfully implemented the functionality using a custom js.