Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Print ONLY the text portion of a dropdown list

Avatar

Former Community Member
Does anybody know if there's a way to set up a dropdown list so that the border and the arrow is visible on screen but invisible when printed out on paper(the contained text still needs to be printed)?



Thanks,

Dan
5 Replies

Avatar

Former Community Member
Are you looking at only printing the selection that was made but not the borders and arrow that allow you to operate the dropdown?

Avatar

Former Community Member
yes paul, how would I go about doing that? thanks



Dan

Avatar

Former Community Member
There is a preprint event that will run before the form is printed and a postprint event that will allow you to restore any changes that were made to the form for printing. So on the preprint event you will want to get rid of the caption (this is optional depending on your requirement). To access this property use this command:



DropDownList1.caption.value.text.value = "";



Now to get rid of the appearance of the boxes around the dropdown use:



DropDownList1.ui.choiceList.border.presence = "hidden";



Note that the dropdown arrow will not appear in a printout.



On the postprint event you will want to restore the settings that were there before so use these commands again:



DropDownList1.caption.value .text.value = "DropDown Caption";

DropDownList1.ui.choiceList.border.presence = "visible";

Avatar

Former Community Member
By setting the object's access property to be readOnly will also remove the arrow from the screen, the borders and caption will remain as is.



DropDownList1.access = "readOnly";