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.

How to prompt the user to save the file in a particular file name

Avatar

Level 9

Hello All,

I have a form which has several fields. Out of those one field is called CustomerName. Is it possible to save the file in a paricular file name. Like :

"Customer Name  'Today's Date'". When the user tries to save it or save as it it will be in the same format that I have told.

Thanks.

Bibhu.

4 Replies

Avatar

Level 9

Hello All,

Just addition to that, while submitting the file as PDF is it possible to change the file name dynamically by taking some value from the form itself ?

Thanks.

Bibhu.

Avatar

Level 10

Check this articles.

http://thelivecycle.blogspot.com/2009/11/save-form-to-specific-directories-and.html

http://thelivecycle.blogspot.com/2010/11/custom-policies-for-protected-mode.html

In general:

You only can change the file name through the SaveAs function in a trusted enviroment (folder level script).

When you want to submit the form with a different name, you have to save it first.

Avatar

Level 9

Hello Radzmar,

Could you please where to put this folder level script and in which event ? I do not need a SaveAs button. I want this script should fire when I submit the PDF.As I have said the file should be saved by taking data from the CustomerName and appending it to the current date and time. Could you please give a sample form on this ?

Thanks.

Bibhu.

Avatar

Level 10

Hi,

to get in touch with folder level scripts, please read this tutorials first.

http://acrobatusers.com/tutorials/2006/folder_level_scripts

http://acrobatusers.com/tutorials/file-paths-acrobat-javascript

http://acrobatusers.com/tutorials/2008/10/using_trusted_functions

http://acrobatusers.com/tutorials/2006/javascript_console/

As metioned before, you have to save the form with a new file name before you submit it.

Otherwise the file name cannot be changed.