Highlighted

Make email submitted form fields not editable

Avatar

Guest

17-07-2008

I have a form built for registering users for events. When I get the forms in my email I can edit the field input. This may lead to accidentally changing information when entering.



How do I set my document to be un editable after it has been submitted?



Thanks in advance

Replies

Highlighted

Avatar

Guest

17-07-2008

With this code you can set all fields "readOnly":



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

}

}



Use it in the mouseDown-event of your send-button.



Greets

Daniel