Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

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.