wp-user-frontend icon indicating copy to clipboard operation
wp-user-frontend copied to clipboard

[Feature Request] Warning prompt before leaving the incomplete form

Open mmarj opened this issue 3 years ago • 3 comments

Currently, we have the "Post Draft" mode, which allows users to save the posting form and store it on the frontend account.

However, having a warning message while leaving the post form editing page would be super handy for the users.

We can follow the native WordPress backend post workaround- https://prnt.sc/1th8w5t.

mmarj avatar Sep 24 '21 16:09 mmarj

fixed on the release.

zamandevs avatar Nov 17 '21 04:11 zamandevs

Bhai, the implementation still does not fully comply as we expected. The performance should be:

i) If you have the "Post Draft" enable, and you drafted a post already, after which it should not prompt the alert as I already drafted the post. But you'll notice after drafting a post, now close the window it will also be prompted- https://prnt.sc/21w1gs0. After drafting a post it should not alert me cause I have already reserved the post.

ii) [Tweak]The alert event should only be functional for the respected/opened post form tab. Currently, the alert prompt will appear to your other open tabs as well- https://prnt.sc/21w28uh. Besides, as we already use the sweatalert library, we can make this alert with the sweatalert instead of the browser's default.

mmarj avatar Dec 05 '21 19:12 mmarj

@mmarj Handled for preview options also. will be on coming released. alert message customization is not possible anymore, for security reasons. so we're bound what the browser shows. yes, you can change return text/message but it won't effect.

zamandevs avatar Dec 07 '21 03:12 zamandevs