Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Make email submitted form fields not editable

Avatar

Not applicable
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
2 Replies

Avatar

Not applicable
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

Avatar

Not applicable
My send button does not have any events such as this?



Please forgive me I am new to this software.

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now