2 Replies Latest reply on May 25, 2011 1:06 PM by thij2803

    Fields not staying locked


      Hello everyone,

                           First of all, let me appologize for my poorly written english. I have have a problem with a form I have designed and I come here seeking for the guru's wisdom. I incorporated a button that is supposed to lock all the fields on the form so that users can save and send while the recipients can't alter the data it contains. The code I used and bound to the click function of the said button is this one (Credit to the author : Girish Bedekar) :



      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";



      When I click on the button, all the fields are locked. But when i save the form and send it to myself to test, all the fields become unlocked and I can edit the data again...


      I would really appreciate some help to resolve that problem.



      Thank you very much