Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Java Scripting Help - Creating a button with function


Not applicable
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!

2 Replies


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 =;


var MyPar1 = doc.getDataObject();

var filename = MyPar1.path;

Good Luck;