Expand my Community achievements bar.

SOLVED

Having trouble with flowed form

Avatar

Level 4

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

1 Accepted Solution

Avatar

Correct answer by
Level 2

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() ;

View solution in original post

4 Replies

Avatar

Correct answer by
Level 2

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() ;

Avatar

Level 4

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

Avatar

Level 2

You're welcome.  But please, if you have the possibility, report this to Adobe support.  I think it's a bug.