How to get unsaved changes alerts to work for custom pages?

it work for my resource pages but doesn't work for my custom page form
Was this page helpful?