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.

Submit XML filename

Avatar

Level 2

Hi,

Is it possible to change the XML file that gets submitted out of a LCD created PDF via email? At the moment the filename is some gibberish or sometimes its the PDF's filename.

Anyone that can explain how the filename gets assigned would be most helpful!

Thanks

PMG

5 Replies

Avatar

Former Community Member

The xml file will take the name of the PDF that it is rendered from. When you use a Preview  a temp file is created and that is where the jibberish name cames from. Once you finish the form and and save it with a proper name then the name of the PDF will be used.

Paul

Avatar

Level 2

Paul,

Is there no other way to change the file name?

If not, is there a way to manipulate the subject line at runtime?

Thanks

PMG

Avatar

Former Community Member

To change the filename you woudl have to do a File SaveAs and change the PDF file name (this will involve user interaction). You have complete comtrol over the subject line. How you affect it depends on how you implemented the email button...can you elaborate on how you did the email?

Paul

Avatar

Level 2

I did it old school, a.k.a. I used a normal button and changed the submit URL to mailto:

PMG

Avatar

Former Community Member

Then you can hard code a subject in the mailto protocol or if you want to take information from the form amd make that part of the subject you vcan get at it programmatically by creating a fake email button that you expose to the user and then hide the real email button by making it hidden. Then on the click event of the fake email button you do something like this:

RealEmailButtonName.event__click.submit.target = "mailto:test@adobe.com?subject=" + SubjectfieldName.rawValue;
Button2.execEvent("click");

Where subject field name is the name of the field that holds the subject that you want to place in there.

Hope that helps

Paul