• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

How do I make drop down menu arrow disappear after the area is filled out?

Community Beginner ,
Aug 10, 2021 Aug 10, 2021

Copy link to clipboard

Copied

I have a fillable PDF with a lot of drop down menus. How do you make the arrows disappear after they enter the value? Would like to not have it there when it is printed.

Annual Inspection.jpg

TOPICS
PDF forms

Views

8.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 20, 2021 Oct 20, 2021

The user will be able to select a value and change their selection as usual. It will be completely transparent for them. You can achieve it by applying the following code under Tools - JavaScript - Set Document Actions - Will Print:

 

for (var i=0; i<this.numFields; i++) {
	var fname = this.getNthFieldName(i);
	var f = this.getField(fname);
	if (f==null) continue;
	if (f.type=="combobox") f.readonly = true;
}

 

And this code under the Did Print event:

 

for (var i=0; i<this.numFields; i++) {
	va
...

Votes

Translate

Translate
Community Expert ,
Aug 10, 2021 Aug 10, 2021

Copy link to clipboard

Copied

You can do so by making the field read-only. However, if you do that after they select a value they won't be able to change it, which is not ideal.

Instead, you can do so (using a script) in the document's Will Print event, and then undo it in the Did Print event.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 20, 2021 Oct 20, 2021

Copy link to clipboard

Copied

So someone using Acrobat Reader DC would still be able to chose an item from the list, but after selecting an item from the drop down they can't change it without closing and opening the file back up again?  Just trying to be sure I follow what you are saying. I am having the same issue with a form I created, but don't know how to write script so this is likely my best option, if it will work the way I think you have explained.  We just don't want the arrow to print on the form after they chose an option from the list, but they do need to be able to select an item from the list.  If they chose the wrong thing and need to change it, then if it has to be closed and re-opened we can make that adjustment so long as they CAN choose an item from the drop down in Acrobat Reader DC and it won't print the arrow.

 

Thank you!

 

When I test it on my adobe acrobat DC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 20, 2021 Oct 20, 2021

Copy link to clipboard

Copied

The user will be able to select a value and change their selection as usual. It will be completely transparent for them. You can achieve it by applying the following code under Tools - JavaScript - Set Document Actions - Will Print:

 

for (var i=0; i<this.numFields; i++) {
	var fname = this.getNthFieldName(i);
	var f = this.getField(fname);
	if (f==null) continue;
	if (f.type=="combobox") f.readonly = true;
}

 

And this code under the Did Print event:

 

for (var i=0; i<this.numFields; i++) {
	var fname = this.getNthFieldName(i);
	var f = this.getField(fname);
	if (f==null) continue;
	if (f.type=="combobox") f.readonly = false;
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 20, 2021 Oct 20, 2021

Copy link to clipboard

Copied

Thank you SO much for your help.  I was able to follow your instructions and get the script added for each of the print actions very easily, but unfortunately I was told it still printed with the arrows after I saved the file and sent it to the person to test it for me.  Do I also need to check "Read Only" under the drop down field's properties?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 20, 2021 Oct 20, 2021

Copy link to clipboard

Copied

No, you don't.

 

Did they actually print the file, or just checked the preview in the Print dialog?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 20, 2021 Oct 20, 2021

Copy link to clipboard

Copied

They did actually print it, I asked them the same thing lol so they sent me a picture of it after printing and the arrow still shows up  : (

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 20, 2021 Oct 20, 2021

Copy link to clipboard

Copied

Works fine for me... Are you sure they opened the file using Adobe Acrobat or Reader?

Can you share the file with us?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 20, 2021 Oct 20, 2021

Copy link to clipboard

Copied

It is Acrobat Pro DC for me the editor, and Acrobat Reader for them.  Here is the picture she sent me.  The original file is also attached.

16914.jpeg

 

Thank you again for your help!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 20, 2021 Oct 20, 2021

Copy link to clipboard

Copied

I used a virtual printer and it worked fine...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 21, 2021 Oct 21, 2021

Copy link to clipboard

Copied

I was able to get it to print without the arrows by logging in to one of the store's computers that had issues and they thought it was opening in adobe but it was opening in MS Edge.  I'm so incredibly grateful for your help on this, thank you so very much!!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 21, 2021 Oct 21, 2021

Copy link to clipboard

Copied

Side note: I tested the original file I had used before adding the script and when opened in adobe it also doesn't print with the arrows, so that's interesting bit : )  Had I just checked that in the first place I could have saved all the trouble.  But thank you nonetheless!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 21, 2021 Oct 21, 2021

Copy link to clipboard

Copied

What happens when you print the form?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 21, 2021 Oct 21, 2021

Copy link to clipboard

Copied

I got an email from a different store that said it worked fine for them as well, I have two so far saying the arrows are printing for them so I'll have to see how they are printing it.  The arrows never print for me but I assumed that was because I was using Pro DC not reader.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 21, 2021 Oct 21, 2021

Copy link to clipboard

Copied

Thank you! Followed the instructions and printed it out and it worked perfectly. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 22, 2022 Feb 22, 2022

Copy link to clipboard

Copied

Hi,

I have tried using your code and the Will Print script says syntax error line 2. Did Print is fine. I am a newbie to script and tried everything like writing again and whatever I knew. It's even giving error with blank line. I'm using Adobe Acrobat Pro 2021. Any solutions?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 22, 2022 Feb 22, 2022

Copy link to clipboard

Copied

There are no errors in that code. Did you edit it in any way?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 30, 2022 Jun 30, 2022

Copy link to clipboard

Copied

Awesome, thanks so much for this. And you're right, it must be opened in Acrobat (not Edge or whatever). Works great!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 17, 2023 Nov 17, 2023

Copy link to clipboard

Copied

Is this only good for his form?  I'm trying to do the same thing but it's still printing on my side.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 17, 2023 Nov 17, 2023

Copy link to clipboard

Copied

LATEST

No, it can be used in any file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 21, 2021 Oct 21, 2021

Copy link to clipboard

Copied

I used a virtual printer and it worked fine for me too.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines