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.

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;