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.

Browse button in Adobe Livecycle designer ES 8.2


Level 2

Hi All,

LiveCycle Designer

I'm trying  to add attachment in PDF from using Adobe Livecycle ES 8.2 designer tool.Used the custom script in button click, but it's not working. Please someone quickly advise me and share the custom script to add attachment in button click event.

Script is

  var annot = this.addAnnot({

        page: 0,

        type: "FileAttachment",

        point: [500, 500],

        noView: true,

      author: "Attachment"



    var attachmentObj = annot.attachment;

    if (attachmentObj !== null) {

        app.alert("Add this file: " + attachmentObj.name);

        var l = this.getField("lst1");

        l.insertItemAt(attachmentObj.name, 0);


1 Reply


Level 10

This is a script for use in Adobe Acrobat not LiveCycle Designer. There is difference in the JavaScript API between those applications, so it won't work in a form you creating with Designer. Btw. Designer is only the tool to design forms, not to use them. The forms will be opened in Adobe Acrobat or Adobe Acrobat Reader at the end. You'll only be allowed to add attachments by scriptings in Acrobat but not in Reader, because as its name already says, it's for reading. So if the destinated user will only have Reader, forget about it.

Well, there is little a chance to have this function for Reader too by using the so called LiveCycle Reader Extensions. This is a module for a LiveCycle server (not the Designer you have!) that can add additional right to PDF form to enable functions in Reader that normally only Acrobat has. But, yes there is a but. It's very, very, very expensive, so you propably don't have it.