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

New Here ,
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

1.3K

Likes

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

Adobe Community Professional , 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
...

Likes

Translate

Translate
Adobe Community Professional ,
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.

Likes

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

Likes

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
Adobe Community Professional ,
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;
}

Likes

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?

Likes

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
Adobe Community Professional ,
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?

Likes

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  : (

Likes

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
Adobe Community Professional ,
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?

Likes

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!

Likes

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
Adobe Community Professional ,
Oct 20, 2021 Oct 20, 2021

Copy link to clipboard

Copied

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

Likes

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!!!

Likes

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!

Likes

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
Adobe Community Professional ,
Oct 21, 2021 Oct 21, 2021

Copy link to clipboard

Copied

What happens when you print the form?

Likes

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.

Likes

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

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

Likes

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?

Likes

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
Adobe Community Professional ,
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?

Likes

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

LATEST

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

Likes

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
Adobe Community Professional ,
Oct 21, 2021 Oct 21, 2021

Copy link to clipboard

Copied

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

Likes

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