Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

File name into text field

Avatar

Level 3

Is there a way to display the forms file name, into a text field?

Example: The form's file name is "MyForm.1.01.pdf"

I would like to display "MyForm.1.01" in a text field on the form.

If my form is saved and goes up a revision to say "MyForm.1.02"

"MyForm.1.02" is then displayed in the text field.

I was thinking, this could be on the pre open event, so that when the form is saved, it would display the new revision when the form is next opened?

Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

The following will get the file name:

this.rawValue = event.target.documentFileName;

I would put this in the docReady event, as this event fires only once, when the form opens.

There is a sample here: https://acrobat.com/#d=ZnxO-dlXXFDS0GvYcQk2NQ

Hope that helps,

Niall

Assure Dynamics

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

The following will get the file name:

this.rawValue = event.target.documentFileName;

I would put this in the docReady event, as this event fires only once, when the form opens.

There is a sample here: https://acrobat.com/#d=ZnxO-dlXXFDS0GvYcQk2NQ

Hope that helps,

Niall

Assure Dynamics