Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Renaming a pdf document using fields in the form

Avatar

Level 2

Hello!

I have a form with a button that allows the user to send it by e-mail.  I would like the attached pdf file in the e-mail to be named after fields that have been entered by the user (like the person's name, employee number).  Is this possible to do using LiveCycle Designer (ES 2), if it's the case, how can I achieve this?

Thanks,

Dave

3 Replies

Avatar

Former Community Member

The filename that is used is the name of the currently open file. So if you want to make a name up you woudl have to do a save (app.execMenuItem("SaveAs") which wil bring up a file dialog) and have the user select the name, then hit save.

Paul

Avatar

Level 2

So are you saying there is no way that my form can be named automatically (without the user having to rename it) after data in the form?

I don't know much about script editing.  Where would I write this code, right at the end of my submit button code?

Thank you very much!

Avatar

Former Community Member

Thatis what I am saying .....you cannot programmatically rename your form without the user intervention.

You woudl have to do it before you submit not after...otherwise the file name will still be the old.

Paul