0 Replies Latest reply on Feb 27, 2014 1:01 PM by MiHoAuGr

    Read Only form after Submit to Email


      I have a form i'm working on. Basically its a form I like for users to fill out and then click submit once they are done to send it in an email. The script i found below does what I want but with further testing i found out it's not exactly what I want. Basically it will make all the fields in my form Read only once the Submit button is clicked. Problem is that if you hit Submit and then realized you need to go back and make a change, you can't. The trigger to Read Only is when you click Submit. Is there a way I can do the lock down once the receipient receives the form? I'm a noob so please go easy with the responses =) thank you all in advance!




      I found some documentation that says to not change the form in ready:layout event (which what I was doing with the "readOnly", so I placed the following code (to make all fields readOnly) in the Button's mouseDown event.



      // Get the field containers from each page.

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

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

      var nodesLength = oFields.length;


      // Set the access type.

      for (var j = 0; j < nodesLength; j++) {

      var oItem = oFields.item(j);

      if (oItem != this) {

      • oItem.access = "readOnly";