Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Flatten doc before submitting

Avatar

Level 3

Is there a way I can flatten a form before submitting, like a script on the presubmit????

10 Replies

Avatar

Level 3

Hey Paul,

to make it uneditable and a smaller file size to submit

Avatar

Former Community Member

You can lock the fields (to make it uneditable) but you cannot change the file size until it is on the server. There are

many posts on this forum on how to lockk all of the fields before a submit.

Paul

Avatar

Level 10

Paul,

     How do you change the file size on the Server?

Thanks

Srini

Avatar

Former Community Member

Flattening is a term that means different things to different people. Once the user has finished filling the form if you are interested in creating a record of the transaction many people will "flatten" the form (basically take the form "ness" out of the form - there are no fields ...just text).

Paul

Avatar

Level 3

for anyone else reading this thread,  this was the script

I found, that I added to the exit event of my submit button, so the form is rendered inactive (read only) before it gets sent

// Get the field containers from each page.

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

}

}

Avatar

Level 1

I am having the reverse problem. I have a form that people fill out and submit via email, but when it gets to me it is no longer a form. I can't alter their answers when they fill out the wrong info. Why would it come back as a plain PDF file and not a form?

Please any advice would be great!!

Thank you,

es

Avatar

Former Community Member

Is there any code on the form that will lock the fields? It is difficult to tell you what is happening without seeing the form. Can yo attach it?

Paul

Avatar

Level 1

I'm sorry I only see the option to insert an image and not to attach the file. Tell me how to attach the file and I gladly will.

es

Avatar

Former Community Member

The functionality has been off and on again over the last couple of weeks. Email it to LiveCycle8@gmail.com instead.

Paul