Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Forms
Viewing all articles
Browse latest Browse all 61369

Line Count & Multiple Text Fill in Static Form

$
0
0

I've created a static .pdf form using LiveCycle Designer ES2 with JavaScript. I'm transferring user-input data to a calculated text box. I know if the form was dynamic, I could force a new page when the data in the calculated text box overflows. For various reasons, I've chosen a static form instead and am trying to add a 2nd page with a calculated text box in case data overflows from the first text box. This is so that if the user prints the form, they can see all the data without doing multiple prints. The problem is I can't come up with the proper JavaScript to cause JUST the overflowed data to move to the 2nd text box. I either get all or none. The other problem I have is that the loop on the first page is not stopping at the line count I requested.

 

I've tried various code edits, but the code below, which I have in the topmostSubform::calculate - (JavaScript, client) section, is what I have currently. With this code, no data populates to the txtAllComm2 text box. Can someone please help me debug this? I've been working for hours on this trying different things and am out of ideas. Thanks in advance!

 

//calc code

//Page1

if(lineCount<=30){

     for (i=1; i<=23; i++)

     {

     if(xfa.resolveNode("Page1.txtComm"+i).rawValue != null)

          {

          lineCount++;

          Page6.txtAllComm.rawValue += xfa.resolveNode("Page1.txtComm"+i).rawValue + lineCount + "\n";

          }

     }

}else if(lineCount >=31){

     for (i=1; i<=23; i++)

     {

     if(xfa.resolveNode("Page1.txtComm"+i).rawValue != null && xfa.resolveNode("Page1.txtComm"+i).rawValue != xfa.resolveNode.Page6.txtAllComm.rawValue)

          {

          lineCount++;

          Page7.txtAllComm2.rawValue += xfa.resolveNode("Page1.txtComm"+i).rawValue + "\n";

          }

     }

}

//Page 2

if(lineCount<=30){

     for (i=24; i<=50; i++)

     {

     if(xfa.resolveNode("Page2.txtComm"+i).rawValue != null)

          {

          lineCount++;

          Page6.txtAllComm.rawValue += xfa.resolveNode("Page2.txtComm"+i).rawValue + lineCount +"\n";

          }

     }

}else if(lineCount >=31){

     for (i=24; i<=50; i++)

     {

     if(xfa.resolveNode("Page2.txtComm"+i).rawValue != null && xfa.resolveNode("Page2.txtComm"+i).rawValue != xfa.resolveNode.Page6.txtAllComm.rawValue)

          {

          lineCount++;

          Page7.txtAllComm2.rawValue += xfa.resolveNode("Page2.txtComm"+i).rawValue + "\n";

          }

     }

}


Viewing all articles
Browse latest Browse all 61369

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>