Skip to main content
JR Boulay
Community Expert
Community Expert
November 3, 2016
Answered

"Cancel" button as default

  • November 3, 2016
  • 3 replies
  • 1147 views

Hi.

I have an alert box prompting users at form opening.

It's a question with 2 buttons: YES and NO.

YES is the default button, hit by using the enter key, but I need the NO button to be the default one.

Is it possible?

I cannot find anything related in the JS Reference.

This topic has been closed for replies.
Correct answer George_Johnson

It would be possible if you create a custom dialog.

3 replies

JR Boulay
Community Expert
JR BoulayCommunity ExpertAuthor
Community Expert
November 4, 2016

Thank you George for pointing me in the right direction, a custom dialog box is my salvation. Thom helps me once again.

And guess what?…

In custom dialog boxes, when using an OK_Cancel button set… Cancel is the default one!

Bug or feature?

In any case it's good for me.

Acrobate du PDF, InDesigner et Photoshopographe
Inspiring
November 4, 2016

JR,

I'm glad it's working for you. Whenever you create a custom dialog, be sure to test it out on both a Mac and Windows if you can, and even different versions of Acrobat/Reader. They can appear differently on different systems, but this usually isn't a big problem with such simple dialogs.

Inspiring
November 3, 2016

Or rephrase the question.

George_JohnsonCorrect answer
Inspiring
November 3, 2016

It would be possible if you create a custom dialog.

JR Boulay
Community Expert
JR BoulayCommunity ExpertAuthor
Community Expert
November 3, 2016

It would be possible if you create a custom dialog.

Can you elaborate?

(Since the question is: "Do you want to print now?" it may be difficult to reverse it )

Acrobate du PDF, InDesigner et Photoshopographe
Inspiring
November 3, 2016

JR,

Have you done much work with custom dialogs? Here's a link to a short introductory tutorial: https://acrobatusers.com/tutorials/popup_windows_part5

George