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

Invisible to Visible to Invisible - Filled fields turning back invisible after save/close

$
0
0

Good morning,

 

I've spent the better part of the last couple hours trying to develop a workaround to my current dilemma.

 

I have a dynamic PDF that has a bunch of invisible fields in it.

 

The user, by input of a drop-down, triggers a javascript switch which sets visibility for text fields in the form accordingly.

 

The form itself works fine initially. But when one of my users saves the PDF with filled in information (using Reader with Extended Rights).... when the file is reopened all visible fields set their presences back to default (which is invisible). None of the data is lost, it just looks like the presence flip-flops back to invisible.

 

My planned workaround to this has been to build a Doc:Ready event that will serve to check every invisible field when the file opens and set non-empty fields to visible. However, I've been having difficulty with the text fields evaluating correctly.

 

if

 

(DocumentAffected1.length > 0){

DocumentAffected1.presence

= "visible";}

 

I've tried Length, RawValue... used "0" and ""... and nothing seems to be working.

 

Is there a better way to check if my text fields have data? And if so, could you provide some example code?

 

 

I'm not a strong coder. All of my Javascript has been pinched from examples elsewhere in this forum. But it's nothing more than simple IF's and Switches.


Viewing all articles
Browse latest Browse all 5571

Trending Articles



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