Skip to main content
conithag0710
Participant
October 27, 2016
Answered

How do I make a drop down list print ONLY if an item is selected?

  • October 27, 2016
  • 5 replies
  • 1092 views

I have created a drop down list for a dated item. If that date is not used, I do not want the drop box to print. I only want it to print if the user has actually chosen an item in the drop down list.

This topic has been closed for replies.
Correct answer try67

Use this code as the field's custom Validation script:

event.target.display = (event.value==event.target.defaultValue) ? display.noPrint : display.visible;

5 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
October 28, 2016

Use this code as the field's custom Validation script:

event.target.display = (event.value==event.target.defaultValue) ? display.noPrint : display.visible;

conithag0710
Participant
October 31, 2016

THANK YOU!

Inspiring
October 27, 2016

How are you determining if an item has been selected from a drop down list?

You can set the field's display property to "displaynoPrint"

conithag0710
Participant
October 27, 2016


Are these the options you are talking about? Where is that option? When I pick
“Visible but doesn’t print” it doesn’t print if an item is selected or not selected. I
just want it to print IF they pick one of the items in the drop down. Does that
make sense?

Inspiring
October 27, 2016

You have to use JavaScript to test the value of the dropbox. When an item has been selected then your script sets the's display proprty to visible, if the value of the field indicates a no selection has been made, then your script sets the display to visible no print.

This done by programming in JavaScript. The provided link is to the JavaScript Reference for the field's display property. You nred to code this action in the fields "On blur" action.