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

Script to hide drop down list from being printed

boourns
Registered: Apr 11 2011
Posts: 10
Answered

I have a drop down list which selects certain company logos to appear on the title page of a document. That is all working fine but I want the drop down list to be hidden when the document is printed. What code should I be including in the script to make this happen?
 
Here is the document that I have been working on if this helps
 
Below is the current coding that I have so far;
 

topmostSubform.Page1.Subform1.DropDownList1::change - (FormCalc, client)
// Code written by Tim Huff - Business Development Manager for Acrobat Sept 9 2007
 
// Populate a variable (sNewValue) with the Current Value of the Drop-down list using the newText event.
var sNewValue = $.boundItem(xfa.event.newText)
 
// Test your variable agaist the name of the Image Object. The names for each Image object is listed under the Image
if (sNewValue == "OneSteel") then //Let's hide the Acrobat Logo
OneSteel.presence = "visible";
NatSteel.presence = "invisible";
ARC.presence = "invisible";
ActiveSteel.presence = "invisible";
NeumannSteel.presence = "invisible";
Pryme.presence = "invisible";
Wagners.presence = "invisible";
MeshBar.presence = "invisible";
WireIndustries.presence = "invisible";
 

elseif (sNewValue == "NatSteel") then //Let's hide the Acrobat Pro Box
NatSteel.presence = "visible";
OneSteel.presence = "invisible";
ARC.presence = "invisible";
ActiveSteel.presence = "invisible";
MeshBar.presence = "invisible";
NeumannSteel.presence = "invisible";
Pryme.presence = "invisible";
Wagners.presence = "invisible";
MeshBar.presence = "invisible";
WireIndustries.presence = "invisible";

elseif ( sNewValue == "ARC") then //Let's hide the Acrobat 3D Box
ARC.presence = "visible";
OneSteel.presence = "invisible";
NatSteel.presence = "invisible";
ActiveSteel.presence = "invisible";
MeshBar.presence = "invisible";
NeumannSteel.presence = "invisible";
Pryme.presence = "invisible";
Wagners.presence = "invisible";
MeshBar.presence = "invisible";
WireIndustries.presence = "invisible";

elseif ( sNewValue == "ActiveSteel") then //Let's hide the Acrobat 3D Box
ActiveSteel.presence = "visible";
OneSteel.presence = "invisible";
NatSteel.presence = "invisible";
ARC.presence = "invisible";
MeshBar.presence = "invisible";
NeumannSteel.presence = "invisible";
Pryme.presence = "invisible";
Wagners.presence = "invisible";
MeshBar.presence = "invisible";
WireIndustries.presence = "invisible";

elseif ( sNewValue == "Mesh & Bar") then //Let's hide the Acrobat 3D Box
MeshBar.presence = "invisible";
OneSteel.presence = "invisible";
NatSteel.presence = "invisible";
ARC.presence = "invisible";
ActiveSteel.presence = "invisible";
NeumannSteel.presence = "invisible";
Pryme.presence = "invisible";
Wagners.presence = "invisible";
MeshBar.presence = "visible";
WireIndustries.presence = "invisible";

elseif ( sNewValue == "Neumann Steel") then //Let's hide the Acrobat 3D Box
MeshBar.presence = "invisible";
OneSteel.presence = "invisible";
NatSteel.presence = "invisible";
ARC.presence = "invisible";
ActiveSteel.presence = "invisible";
NeumannSteel.presence = "visible";
Pryme.presence = "invisible";
Wagners.presence = "invisible";
MeshBar.presence = "invisible";
WireIndustries.presence = "invisible";

elseif ( sNewValue == "Pryme") then //Let's hide the Acrobat 3D Box
MeshBar.presence = "invisible";
OneSteel.presence = "invisible";
NatSteel.presence = "invisible";
ARC.presence = "invisible";
ActiveSteel.presence = "invisible";
NeumannSteel.presence = "invisible";
Pryme.presence = "visible";
Wagners.presence = "invisible";
MeshBar.presence = "invisible";
WireIndustries.presence = "invisible";

elseif ( sNewValue == "Wagners Reinforcing") then //Let's hide the Acrobat 3D Box
MeshBar.presence = "invisible";
OneSteel.presence = "invisible";
NatSteel.presence = "invisible";
ARC.presence = "invisible";
ActiveSteel.presence = "invisible";
NeumannSteel.presence = "invisible";
Pryme.presence = "invisible";
Wagners.presence = "visible";
MeshBar.presence = "invisible";
WireIndustries.presence = "invisible";

elseif ( sNewValue == "Wire Industries") then //Let's hide the Acrobat 3D Box
MeshBar.presence = "invisible";
OneSteel.presence = "invisible";
NatSteel.presence = "invisible";
ARC.presence = "invisible";
ActiveSteel.presence = "invisible";
NeumannSteel.presence = "invisible";
Pryme.presence = "invisible";
Wagners.presence = "invisible";
MeshBar.presence = "invisible";
WireIndustries.presence = "visible";

elseif ( sNewValue == "All Hidden") then // Ok for fun let's hide'em all
OneSteel.presence = "invisible";
NatSteel.presence = "invisible";
ARC.presence = "invisible";
ActiveSteel.presence = "invisible";
MeshBar.presence = "invisible";
NeumannSteel.presence = "invisible";
Pryme.presence = "invisible";
Wagners.presence = "invisible";
MeshBar.presence = "invisible";
WireIndustries.presence = "invisible";

endif

My Product Information:
LiveCycle Designer, Windows
Bamboolian
Registered: Jul 27 2010
Posts: 48
Hi,

In the [Object parette]-[Field tab], there is a drop-down for "Presence".
You can select "Visible (Screen only)" for your requirement.
boourns
Registered: Apr 11 2011
Posts: 10
Bamboolian wrote:
Hi,In the [Object parette]-[Field tab], there is a drop-down for "Presence".
You can select "Visible (Screen only)" for your requirement.
I've done this and opened it up in Adobe Acrobat Pro to print. The physical drop down list doesn't print but the text in the drop down list as well as the caption text next to it still appear.
Bamboolian
Registered: Jul 27 2010
Posts: 48
Hi,

Maybe the target version of your PDF is under 8.0.
The Visible(Screen only) option is available starting from Acrobat ver8.0.
Check [File]-[form properties]-[Defaults]-[Target version].

boourns
Registered: Apr 11 2011
Posts: 10
I changed these settings so that the default is Acrobat 8.1 The caption text and drop down list text are still appearing when printed.
Bamboolian
Registered: Jul 27 2010
Posts: 48
Accepted Answer
Hi,

I finally got to DL your file.
I've seen it, and found one of your problem is above version but as you have said, still cannot make it to work.
The thing is, I made new blank LCD document and pasted objects under "Page 1", and that seems to work fine.

Maybe initial creation with target version 7.0 set some kind of information in the document behind.

Sorry but I'm out of ideas.
I'll let other experts for further advise.
boourns
Registered: Apr 11 2011
Posts: 10
Bamboolian wrote:
Hi,I finally got to DL your file.
I've seen it, and found one of your problem is above version but as you have said, still cannot make it to work.
The thing is, I made new blank LCD document and pasted objects under "Page 1", and that seems to work fine.

Maybe initial creation with target version 7.0 set some kind of information in the document behind.

Sorry but I'm out of ideas.
I'll let other experts for further advise.
Huzzah I copied it into a new document and it works! Thanks so much for your help :)