Copy link to clipboard
Copied
I have a form with 3 yes/no questions. I am using radio buttons (a, b, c). I need to trigger an event -- make a hidden text box visible -- only if the answer is 'yes' to all three questions.
I have this code but it doesn't work. Not sure what's wrong. Please help
event.target.hidden = !( (this.getField("a").value=="aYes") && (this.getField("b").value=="bYes") && (this.getField("c").value=="cYes"))
Copy link to clipboard
Copied
Where did you place this code? Are there any error messages in the JS Console when you use it?
You should not use the hidden property. It's deprecated. Use the display property, instead.
Copy link to clipboard
Copied
I placed it in the custom calculation script of the hidden field
No didn't get any errors
Copy link to clipboard
Copied
Can you share the actual file with us?
You can attach it to the original message using the tiny paperclip icon at the bottom when you edit it, or upload it to a file-sharing website (like Dropbox, Google Drive, Adobe Cloud, etc.), generate a share link and then post it here.
Copy link to clipboard
Copied
No luck with display either
Copy link to clipboard
Copied
here it is
Copy link to clipboard
Copied
You didn't use the correct export values in your code. It's "Yes" and "No", not "aYes", "bYes", etc.
Copy link to clipboard
Copied
Thank you so much!
🙂