Skip to main content
Participant
August 16, 2017
Question

New To Javascript - Help!n

  • August 16, 2017
  • 1 reply
  • 248 views

Im new to javascript and have no idea what I am doing. Im making a form which, when a check box is marked, requires another field to be filled. In my screenshot, there is a check box if a person was referred by a doctor. I want to require the name and phone number of the doctor if the check box is checked. I have been looking around the forums but I don't seem to be able to find an answer to my question. Im certain someone knows how to help me with all of this great knowledge in the forum. I appreciate your help. Please keep in mind, javascript is NOT a forte.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
August 16, 2017

As the Mouse Up event of the check-box, enter this code:

this.getField("Treatment Center Name").required = event.target.value!="Off";