Total Pageviews

Thursday, 1 August 2013

Livecycle Designer: Saving fillable form as non fillable - Lock all fields, Sign and Email

In order save your fillable PDF form as non-fillable:

  1. Lock all fields or make them read only
  2. Sign submission - Data signature
  3. Email submit

//form1.#subform[0].Button1::initialize - (JavaScript, client)
//these red coloured code is auto generated when you create a submit button with -sign submission option //checked
//{{Adobe LiveCycle Designer Generated Code Begin}} - sign data target version check script. Do NOT modify!
if (xfa.host.name=="Acrobat"){
   if (app.viewerVersion < 8)
   {
       this.access = "readOnly";
   }
   else
   {
     this.access = "open";
   }
}

//Real code begins here
//{{Adobe LiveCycle Designer Generated Code End}} - sign data target version script.
 //form1.#subform[0].Button1::mouseDown - (JavaScript, client)
for (var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++) {
var oFields = xfa.layout.pageContent(nPageCount, "field");
var nNodesLength = oFields.length;
// Set the field property.
for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) {
oFields.item(nNodeCount).access = "readOnly";
}
}

No comments:

Post a Comment