Skip to main content
gamzes93533812
Known Participant
Oct 23, 2017 2:47 PM UTC
Answered

if checkbox is checked display image field

I am creating a pdf form in which user selects the checkbox (or it can be radiobutton) (eg. field name:CheckBox1), I would like the image upload field (eg. fieldname: Image1) to be visible otherwise invisible. Is it possible?

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Oct 23, 2017 5:19 PM UTC

A check-box is better, as a radio-button field can't be "un-selected" by clicking it.

Use this code as the field's Mouse Up event:

this.getField("Image1").display = (event.target.value=="Off") ? display.hidden : display.visible;

2 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Oct 23, 2017 5:19 PM UTC

A check-box is better, as a radio-button field can't be "un-selected" by clicking it.

Use this code as the field's Mouse Up event:

this.getField("Image1").display = (event.target.value=="Off") ? display.hidden : display.visible;

Translate
gamzes93533812
Known Participant
Oct 24, 2017 7:46 AM UTC

Thank you works perfect. try67​

Translate