Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Adding a dialog pop up warning when reset button is clicked

Avatar

Level 1

Hello,

I'd like to add a dialog box warning to the "reset" button that will pop up when the button is clicked, with text saying something like "are you sure you'd like to reset the form?" before the form actually gets reset. The purpose will be to help users avoid resetting the form on accident. Any ideas would be appreciated, I'm kinda in the dark ages using LiveCycle Designer 7.0.7.

Thanks,

S.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

This should work in v7. Put it in the click event of the reset button.

var nButton = app.alert({
cMsg: "Warning: You are about to reset the form. \n\nDo you want to continue?",
cTitle: "Your title here",
nIcon: 1, nType: 2
});


if (nButton == 4)
{

     xfa.host.resetData();

}

The script puts an app.alert out before the reset. If the user click Yes then the form is reset. If No then the form is not reset.

Good luck,

Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

This should work in v7. Put it in the click event of the reset button.

var nButton = app.alert({
cMsg: "Warning: You are about to reset the form. \n\nDo you want to continue?",
cTitle: "Your title here",
nIcon: 1, nType: 2
});


if (nButton == 4)
{

     xfa.host.resetData();

}

The script puts an app.alert out before the reset. If the user click Yes then the form is reset. If No then the form is not reset.

Good luck,

Niall

Avatar

Level 1

That worked beautifully, thanks Niall I appreciate it!

-S