Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Avoid "Do you want to save changes to <filename> before closing?"

Avatar

Former Community Member

Hi,

When I open a reader enabled form and close it without doing anything it prompts "Do you want save changes to <filename> before closing?". How to get rid of this? I tried the below code in the layout ready event of a button but still no effect.

event.target.dirty=false;

event.target.requiresFullSave=false;

Any solution is greatly appreciated. Many thanks in advance.

9 Replies

Avatar

Level 10

You can create a close Button with this script in its click event.

Avatar

Former Community Member

Hi radzmar,

The message pops out when I click on the close button in the adobe reader. How to avoid that?

Thanks.

Avatar

Level 10

The script you already use

is the only way to avoid that.

If it doesn't work, then because of any other script, that is executed also in the layoutReady event that causes to change the dirty flag back to true.

Avatar

Former Community Member

Is there any way out of it? I need the script in the layoutReady event as well. Kindly help.

Avatar

Level 10

What's the other script you use and why?

Avatar

Former Community Member

The script that is used is for the page numbering (the page n of m element in the livecycle designer). Also script to display/hide a field based on some selection when the form is reopened.

Avatar

Level 10

The show/hide script in the layoutReady event is the problem as it dirties the form permanently.

You should use another event to control the visiblity, like the change event.

Avatar

Former Community Member

Removed all the script in the layoutReady event but the message is still displayed. Kindly help.

Avatar

Level 10

Can you share your form please?