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

popup box when check box ticked

gwh
Registered: May 19 2008
Posts: 47

Hi everyone,
 
I wondered if anyone could tell me if it's possible to have a check box in a pdf file that when ticked, a pop up box appears and this popup contains 3 fields for the user to type in certain information. Then a "done" or "ok" button to dismiss the box. I'd also need some way to store the information that was typed in the input fields so that when the pdf is emailed back to me, I could view the contents.
 
Appreciate any advice.

My Product Information:
Acrobat Pro Extended 9.4.2, Macintosh
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi gwh,

You could do that with a custom dialog. Read the tutorial linked to below and check out the sample file. One of the examples shows a button that when clicked pops up a dialog with text entry field. When the data is entered it populated another field on the form. This would work with a checkbox instead of a button and you can have more than one text entry field in a custom dialog. The only rub is that custom dialog code is not easy to develop, it is an advanced scripting task.
http://acrobatusers.com/tutorials/2006/popup_windows_part5

Acrobat has a built-in response dialog with a single text entry field. There is a tutorial on those as well in that same series linked to above (I forget which Part but you can find it in the Learning Center here). I suppose you could have a series of those pop up one after the other, each with one of the 3 entry fields. The nice thing about this is that it is easier to use since it is built-in, just not as user friendly as having all 3 fields in one dialog.

Hope this helps,

Dimitri
WindJack Solutions
www.pdfscripting.com
www.windjack.com

gwh
Registered: May 19 2008
Posts: 47
Thanks very much Dimitri, I'll take a look at the url that you provided.

Could I ask just one more related question? I have the following code that creates a popup window. It works as expected when used in the full version of acrobat, however when I save the pdf for use in acrobat reader, it no longer works:

var cMessage = "To use the courses the following must be installed and/or enabled on your computer:\n\
– Macromedia Flash Player plug-in must be installed, (see below)\n\
– JavaScript must be enabled, (see below)\n\
– One of the following Internet Browsers, (the software you are using to view this page), must be installed:\n\
– On a Windows PC - Internet Explorer 6.0 or later or Firefox 1.5 or later";

var cMyTitle = "Title";

// Display Alert Box with Information Icon
app.alert({cMsg:cMessage, cTitle:cMyTitle,
nIcon:4, // Information Icon
nType:0 // Ok Button
});

Is there a reason for this?
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi gwh,

It works for me in both Acrobat Pro and Adobe Reader X, so not sure. Where are you putting the code and what version of Reader are you trying it with that doesn't work?

Dimitri
WindJack Solutions
www.pdfscripting.com
www.windjack.com
gwh
Registered: May 19 2008
Posts: 47
Sorry Dimitri, it seems it does actually work. Not sure why it didn't previously. I noticed though that the popup box displays an acrobat icon to the left of the text. Is it possible to replace that icon with a custom icon, ie. for example someone's logo?
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi gwh,

No, you cannot control the dialog frame image but you can add a custom logo image inside of a custom dialog. This must be a custom dialog not the built-in app.alert message box you are currently using. There is an example of a logo inside a custom dialog in that same sample file I mentioned earlier-

http://acrobatusers.com/tutorials/2006/popup_windows_part5

a better example is shown at-
http://acrobatusers.com/tutorials/2006/popup_windows_part5
Look at the Splash Screen example.

Hope this helps,

Dimitri
WindJack Solutions
www.pdfscripting.com
www.windjack.com
gwh
Registered: May 19 2008
Posts: 47
Great - thanks again