Expand my Community achievements bar.

I created a repeating table but want to add a "do you really want to delete this row" prompt.

Avatar

Level 1

Let me clarify, I created a repeating table which allows users in Adobe Reader to add or delete rows.  However, if user inadvertently hits delete, the row and any data is lost with no way to undo.  So, I'd like to either add a pop up prompt for user to confirm they want to execute action or create an undu option somewehre else on the form.  Can this be done?

Message was edited by: deanotn

1 Reply

Avatar

Level 10

Yes you can do it using app.alert().

var nButton = app.alert({

cMsg: "Warning: This will delete the row and all data in it. \n\nDo you want to continue?",

cTitle: "Delete Row",

nIcon: 1, nType: 2

});

if (nButton == 4) {

          deletion code here

}

Description of app.alert() options:

http://acrobatusers.com/tutorials/popup_windows_part1