Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Events ? How I wasted a whole day

$
0
0

All -

 

I would like to modify all of  fields on a form background color in one script tied to a single event.  The script would loop through all of the objects on a multipage form and modify the value of the background color based upon whether or not the field has content.  I learned that I could change the background color in the "calculate event" and in the initialize event the xfa.host.numPages is always zero. I would much rather right one script to do this then modify a 30 page pdf and every textfield in it.  Any help would be appreciated?

 

Another nasty problem I ran into was that you can't use the Adobe Acrobat Pro JavaScript debugger because the fields aren't populated.  Anyway to get around this?

 

Doug

 

for (var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++) {

  var oFields = xfa.layout.pageContent(nPageCount, "field");

  var nNodesLength = oFields.length;

  for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) {   

     if (ln.length == 0) {

      oFields.item(nNodeCount).border.fill.presence = "hidden";

     }

  }

}

 

Message was edited by: Douglas Kunzman


Viewing all articles
Browse latest Browse all 5571

Trending Articles



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