Maybe this is a referencing problem, but I am pulling my hair out because I just don't see what the error is.
The 2 page dynamic form in the link below...
https://files.acrobat.com/preview/8c174446-6064-46b6-9e39-7c99bcf08918
...works fine, UNTIL the first page flows into a 2nd page. THEN, the script in the dropdown list that WAS on the 2nd page (but which is now the 3rd) no longer makes visible the hidden fields. I know you pros out there will know right away what the problem is, and if you can help me out, I'd greatly appreciate it.
Thanks!
Jo
Solved! Go to Solution.
Views
Replies
Total Likes
Nifty problem :-)
I would personally report this to enterprise support team, as I consider this a bug to be honest. Anyway ...
First of all, I noticed that you don't have the problem if you first make a selection in the dropdown and then make the textfield larger and then use the dropdown again. So, first I thought it was the resolveNode in your code, which is actually not needed. But that did not solve the problem. I see this as a layout problem, so I tried to issue an relayout() and ... that works. But I have no clue why I should issue a relayout(), so for me this is a bug, unless somebody from support picks this up and gives a reason for it. Anyway, here is how I rewrote your code. I don't get paid per character I type, so I like short syntax. Replace your code with this, or add the last line to yours, whatever you prefer.
Text1.presence = ( this.rawValue == "1" ? "visible" : "hidden" ) ;
Text2.presence = ( this.rawValue == "2" ? "visible" : "hidden" ) ;
Text3.presence = ( this.rawValue == "3" ? "visible" : "hidden") ;
xfa.layout.relayout() ;
Views
Replies
Total Likes
Nifty problem :-)
I would personally report this to enterprise support team, as I consider this a bug to be honest. Anyway ...
First of all, I noticed that you don't have the problem if you first make a selection in the dropdown and then make the textfield larger and then use the dropdown again. So, first I thought it was the resolveNode in your code, which is actually not needed. But that did not solve the problem. I see this as a layout problem, so I tried to issue an relayout() and ... that works. But I have no clue why I should issue a relayout(), so for me this is a bug, unless somebody from support picks this up and gives a reason for it. Anyway, here is how I rewrote your code. I don't get paid per character I type, so I like short syntax. Replace your code with this, or add the last line to yours, whatever you prefer.
Text1.presence = ( this.rawValue == "1" ? "visible" : "hidden" ) ;
Text2.presence = ( this.rawValue == "2" ? "visible" : "hidden" ) ;
Text3.presence = ( this.rawValue == "3" ? "visible" : "hidden") ;
xfa.layout.relayout() ;
Views
Replies
Total Likes
Beautiful! Works perfectly! And, I very much prefer that shorter code you have used! I am not familiar with that, but it makes sense, and I think I'll adopt using this for conditional dropdowns! Thank you so much!!
Jo
Views
Replies
Total Likes
You're welcome. But please, if you have the possibility, report this to Adobe support. I think it's a bug.
Views
Replies
Total Likes
Will do. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies