Copy link to clipboard
Copied
Hello Again,
I now need to switch the logic around from my previous question.
I have one dropdown field that I would like to appear dependent on the four other dropdown fields all answering Yes to their question.
Guessing I would have to run some kind of validation script, but not sure how to link them all together.
As Always Thank you
Something like this:
var b1 = this.getField("Dropdown1").value=="Yes";
var b2 = this.getField("Dropdown2").value=="Yes";
var b3 = this.getField("Dropdown3").value=="Yes";
var b4 = this.getField("Dropdown4").value=="Yes";
this.getField("Dropdown5").display = (b1 && b2 && b3 && b4) ? display.visible : display.hidden;
Copy link to clipboard
Copied
Bump
Copy link to clipboard
Copied
I would use the calculation script of a (hidden) text field to achieve this, instead of placing a script under each of the drop-down fields.
Copy link to clipboard
Copied
What might that look like?
Copy link to clipboard
Copied
Something like this:
var b1 = this.getField("Dropdown1").value=="Yes";
var b2 = this.getField("Dropdown2").value=="Yes";
var b3 = this.getField("Dropdown3").value=="Yes";
var b4 = this.getField("Dropdown4").value=="Yes";
this.getField("Dropdown5").display = (b1 && b2 && b3 && b4) ? display.visible : display.hidden;
Copy link to clipboard
Copied
I replaced the Dropdown selections with my field names tripled check for spelling errors but it isn't doing anything.
Is there something I'm missing?
var b1 = this.getField("Field 1").value=="Yes";
var b2 = this.getField("Field 2").value=="Yes";
var b3 = this.getField("Field 3").value=="Yes";
var b4 = this.getField("Field 4").value=="Yes";
this.getField("Field 5").display = (b1 && b2 && b3 && b4) ? display.visible:display.hidden;
Copy link to clipboard
Copied
Are there any error messages in the JS Console? If not, can you share the
file (via Dropbox, Google Drive, Adobe Cloud, etc.)?
On Fri, Dec 9, 2016 at 11:30 PM, chughes919 <forums_noreply@adobe.com>
Copy link to clipboard
Copied
Got it to work. Some complication on my end. Thank you for the script!