Skip to main content
Participant
September 14, 2016
Answered

Javascript

  • September 14, 2016
  • 2 replies
  • 449 views

As a novice I'm trying to create Javascript for a PDF whereby ticking boxes 1, 2 or 3 automatically ticks box 4 but I want the tick in box 4 to be unticked if boxes 1, 2 or 3 are unticked/deselected.

At the moment box 4 remains ticked if 1, 2 or 3 are deselected.I've tried options on the net and the code at the moment is if (event.target.value!="Off") this.getField("TICKBOX4").checkThisBox(0, true); but I can't work how to automatically untick box 4 if any of the other 3 are unticked. Any help would be appreciated and I suspect this is quite straightforward if you know what you're doing!!!

This topic has been closed for replies.
Correct answer try67

After that line of code add this line:

else this.getField("TICKBOX4").checkThisBox(0, false);

2 replies

liam6Author
Participant
September 14, 2016

Works a treat and really appreciated, thank you!!!

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
September 14, 2016

After that line of code add this line:

else this.getField("TICKBOX4").checkThisBox(0, false);