Copy link to clipboard
Copied
Our form has numerous dropdown boxes that default to the option "Please Select", and not all of them are used each time the form is used. When we print a hard copy of each document, we would like the "Please Select" (unused) field to disappear when printing - to make a cleaner hard copy. Is there a script for this? I tried using the General Setting "Visible but doesn't print" but of course, the field doesn't print at all - we need it to print only when there has been an option other than the default "Please Select" is selected. Thank you in advance for your help.
Coleen
You can use a custom Validate script, something like:
event.target.display = event.value === "Please Select" ? display.noPrint : display.visible;
For this to take effect, you will need to make a different selection and then set it back to "Please Select". ANother option would be to place it as a custom Format script.
Copy link to clipboard
Copied
You can use a custom Validate script, something like:
event.target.display = event.value === "Please Select" ? display.noPrint : display.visible;
For this to take effect, you will need to make a different selection and then set it back to "Please Select". ANother option would be to place it as a custom Format script.
Copy link to clipboard
Copied
George, I tried this script in both the Custom Validate and Custom Format (separately) and tried printing after making the two selections in the field, the second being "Please Select". When I printed the page, the field still printed. I don't think we want to make two selections on each blank field before we print, so it is likely not worth your time to troubleshoot this.
Thanks,
Coleen
Copy link to clipboard
Copied
You only have to make the two selections just after adding the script. After that, it will work. Validate scripts are triggered when the field value changes, so for you to see the effect initially after adding the script, you have to change the field value.
Copy link to clipboard
Copied
Got it! Thank you very much!! I had to change the code from Please Select to PLEASE SELECT and then it worked perfectly for me. Thanks again.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now