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.
Hi, A simple question; how can I insert the pdf filename (without the file path) as a read only value in a text field. As this is not available as a Runtime property is there a script for this?
Thanks. However I don't seem to be getting anything - the field remains blank. I wonder if I am entering the command in the wrong place - can you offer any specific instruction on where this command should be placed? Cheers
In the initialize event for the text field, add the following client-side JavaScript:
this.rawValue = event.target.documentFileName;
Note, when you preview the PDF in Designer you will see an odd file name like _13fs18f3v9eeb3qs.pdf. When the PDF is opened in Reader or Acrobat you will see the real file name.