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

File Upload Field in Live Cycle Designer

Avatar

Level 1

I've created a form.  In the form I want to ask pepole to upload an attachment (pdf, word).  Is this possible?

1 Reply

Avatar

Level 2

hi b cole,

drag and drop one textfield and button from the library pallete into the layout and then for the button

event : Click   Language : JavaScript

var

entryCount =

0;

var

i =

parseInt(entryCount.value);

var

oDoc =

event.target;

oDoc.importDataObject("entry"

+

i);

var

oAttachment = oDoc.getDataObject("entry" +

i);

var

attachPath =

oAttachment.path;

var

oFile =

oDoc.getDataObjectContents(oAttachment.name);

TextField1.rawValue

=

attachPath;

// app.alert(entryCount.value);

entryCount.value

= String(parseInt(entryCount.value)+

1);

when you click on button a pop up will be opened to select a file from your desired path, select the file.

you will find the file attached in the attachments tab of adobe reader.

Note : In the script the textfield name is TextField1, you should change this name as per your field name

Thanks,

Madhu.