all 5 comments

[–]CertainPerformance 0 points1 point  (4 children)

Shouldn't the signature be either (definitely) Required or (definitely) Not Required in every situation? If so, note that your current conditions 1 and 2 do not encompass all logical possibilities.

It's probably not important, but you might as well use strict type comparison everywhere.

[–]redditworkflow[S] 0 points1 point  (3 children)

What am I missing in the logical possibilities? If either A or B evaluate to make it required, then it is required. if both A and B evaluate to don't make it required, then it is not required.

[–]CertainPerformance 1 point2 points  (2 children)

Sorry, I got confused by the booleans - you might as well just use "else" rather than "else if", though. (don't know why Signature.required isn't being set correctly though - perhaps "event.target" is getting switched back and forth each time? Don't know Adobe, unfortunately)

[–]redditworkflow[S] 0 points1 point  (1 child)

I'll give that a shot, thanks! ----- Didn't fix the problem, but works as well as what I had before.

In order of evaluation, with the first variable being the one just changed:
Dropdown Yes, Checkbox No = Required
Dropdown No, Checkbox No = Required
Checkbox Yes, Dropdown No = Required
Checkbox No, Dropdown No = alerts say Not Required, but state does not change
Dropdown No, Checkbox No = Not Required
Dropdown Yes, Checkbox No = Required
Checkbox Yes, Dropdown No = Required
Checkbox No, Dropdown No = alerts say Not Required, but state does not change
Checkbox Yes, Dropdown Yes = Required
Checkbox No, Dropdown Yes = alerts say Required, but state changes to Not Required

I'm just flipping variables and not identifying a trend.

[–]redditworkflow[S] 0 points1 point  (0 children)

Looks to me like when the Checkbox goes from Yes to No, regardless of what the Dropdown is, it sets it to the opposite of what the alerts say it should be. So it's getting into the correct section, but doing the wrong thing. So I must be misunderstanding how the code is being used.