Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

this.dirty = false

Avatar

Former Community Member
I'm trying to get the reset button to clear the dirty flag so that the form doesn't prompt for saving after hitting reset.



The Acrobat javascript is: this.dirty = false.



This line doesn't work in a Designer form and I can't seem to figure out the SOM to change this document flag in a Designer form.



Anybody know the correct syntax to use?
1 Reply

Avatar

Former Community Member
Alan_Claytor@adobeforums.com wrote:

> I'm trying to get the reset button to clear the dirty flag so that the form doesn't prompt for saving after hitting reset.

>

> The Acrobat javascript is: this.dirty = false.

>

> This line doesn't work in a Designer form and I can't seem to figure out the SOM to change this document flag in a Designer form.

>

> Anybody know the correct syntax to use?



The variable 'this' means different things in the Acrobat and XFA

scripting languages. In Acrobat, 'this' refers to the document object,

while in the designer form, 'this' will refer to your reset button. You

should be able to set the dirty flag as follows:



var myDoc = event.target;

myDoc.dirty = false;



Justin Klei

Cardinal Solutions Group

www.cardinalsolutions.com