I have a form I am trying to adjust. I want to make add a text field and make it required only if a check box above is checked. If the box is not checked no data is necessary in the field. Would someone tell me how to make this work? I'm a bit of a novice at coding but I have a resource who could likely help if we're pointed toward the process to make it work. Thanks!
Copy link to clipboard
As the Mouse Up event of the check-box enter this code:
this.getField("Text1").required = event.target.value!="Off";
Awesome! That worked perfectly! Thank you!
Thank you! You are my savior!
Hi there, sorry to be ignorant but I am new to adobe sign. Where do I enter this text?
You go to the check box while in Prepare Form - go to Actions tab - select Mouse Up - selection Action is Run a Java Script - click Add. A box will come up for you to paste this text. Be sure to change the generic "text" info to the name of the text box you'd like to make required.
I'm glad I found this post after searching for a couple of days, and have the following question:
If I have two text fields that I want to make a required entry, after a box is checked, do I just repeat the code with the new field name?
Can I also jump in on this thread with a question related to this?
How can we hide that required text field and make it visible when the check box is selected? Will the code provided work if we add another code after it?