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

SOLVED

Adding/Deleting Attachments

catherine26
Level 3
Level 3

Is there a script or feature with a button or something that the user can add attachments to a PDF form just using Adobe Reader??  Thanks for any help on this.

1 Accepted Solution
Jono_Moore
Correct answer by
Level 10
Level 10

This is the script on the Add File button:

var myDoc = event.target;

var sFile = "myFile" + NumericField1.rawValue;

myDoc.importDataObject({cName: sFile});

var myDataObject = myDoc.getDataObject(sFile);

var sFileName = myDataObject.path;

ListBox1.addItem(sFileName,sFile);

NumericField1.rawValue = NumericField1.rawValue + 1;

You'll really need to look at it in Designer though to see how everything works.

View solution in original post

6 Replies
Jono_Moore
Level 10
Level 10

There's a sample form here with scripts: http://forums.adobe.com/message/1923918#1923918

(link doesn't seem to be going direct to the message - it's message number 271)

Note that Reader needs to be extended via the Reader Extensions server for file attaching to work.

catherine26
Level 3
Level 3

Thanks for your reply.  The issue is I don't have LiveCycle on this computer so I'm having trouble reading the script for the button.  Is there a way you could email or post just the script to me.  Thanks!

Jono_Moore
Correct answer by
Level 10
Level 10

This is the script on the Add File button:

var myDoc = event.target;

var sFile = "myFile" + NumericField1.rawValue;

myDoc.importDataObject({cName: sFile});

var myDataObject = myDoc.getDataObject(sFile);

var sFileName = myDataObject.path;

ListBox1.addItem(sFileName,sFile);

NumericField1.rawValue = NumericField1.rawValue + 1;

You'll really need to look at it in Designer though to see how everything works.

View solution in original post

catherine26
Level 3
Level 3

Okay I typed in the script for the button.  Is a window suppose to pop-up?  Sorry I'm somewhat new at this scripting thing for Designer. 

catherine26
Level 3
Level 3

Thank you, thank you I finally figured it out.

Jono_Moore
Level 10
Level 10

Hi Catherine, glad you got it. Sorry I didn't get back to you I've been sick for the last few days.