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

Java Scripting Help - Creating a button with function

Avatar

Former Community Member
Hello, I need help with Java Scripting for Adobe LiveCycle Designer v8.



I need to create a button that when pressed, the user can attach a document (word doc, excel doc, jpg etc) to the pdf form they are filling out. The users of the form I am creating are not Acrobat savvy so may not even know that attaching files to a pdf is available. Hence, I need a visible button that when pressed, will automatically display the dialog box to allow the user to attach files to the pdf form.



Many thanks for your help!

Karen.
2 Replies

Avatar

Level 5
I have used following code in relation to a dropdown box. This could be your baseline to try on your own. May not need many changes....



var doc = event.target;

doc.importDataObject();

var MyPar1 = doc.getDataObject();

var filename = MyPar1.path;



Good Luck;