These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Resset button with warning

npitcon
Registered: Jul 29 2009
Posts: 2

I have a form in Acrobat that has reset buttons on each page. The client has requested the button notify the user (with a warning) before going ahead with the action of resetting the page/document.
Does anyone know how to create this action? Apparently it was active on their previous documents so they know it's possible.
Thanks

My Product Information:
Acrobat Pro 9.1.1, Macintosh
suewhitehead
Registered: Jun 3 2008
Posts: 232
I assume that this will work the same for Macs.
Create a button. On the Click action

// display and get response - use the "?" Icon and "YES/NO" return button
var cResponse = app.alert({
cMsg: "All data will be cleared and the fields will be reset to BLANK!\n\nAre you sure you want to clear all the data?", // ā€œ\n\nā€ moves the text down 2 lines in the box
nIcon: 2, nType: 2, //nType adds the buttons Yes,No(2) or OK,Cancel (1)
cTitle: "Clear All Data" //this shows on the title bar beside Warning ā€“ Javascript Window
});
// clear form only if response is "YES" (1)
if (cResponse == 1) {
this.resetForm();
}