2 Replies Latest reply on Jul 6, 2011 11:17 PM by BantonGET

    LiveCycle Checkboxes and "Add Attachment" button


      Hello people,


      I'm currently working on alot of LiveCycle forms (many are very similar), however there are two things that won't seem to work on any of my forms.

      I'm using Adobe LiveCycle Designer ES 8.2.



      I have three checkboxes. None should be "on" by default and only one should be able to be selected at a time. Example:

      I click checkbox 1, it turns "on".

      If I then click checkbox 2 (or 3), the others should be turned "off".

      If I then click 1 again, checkbox 2 should be turned "off".


      Radiobuttons, and litterary dussins of scripts on checkboxes... What should I do?




      Same here, I've spent days trying to figure this out, but for some reason my Java knowledge is not enough for LiveCycle. (If I even have to use Java?)


      I need a button adding an attachment to the form. I then need another button which by default shows "No attachment".

      When I add the attachment by clicking the first button, the "no attachment button" should change name into the attachment's name.

      Here comes the tricky part: When I click the "No attachment" button (which now is called like "anton whatever.pdf") this should work like a View Attachment button.


      Is this even possible?



      Any advice or tips is appriciated, and keep in mind that I'm kind of a novice in LiveCycle.

      Thanks in advance,

      Anton B.

        • 1. Re: LiveCycle Checkboxes and "Add Attachment" button
          radzmar Adobe Community Professional & MVP



          1) To uncheck other checkboxes use the a script like this in the click:Event of each checkbox.

          Form1.#subform[0].CB1::click - (JavaScript, client)

          // Uncheck checkbox "CB2" and "CB3"

          CB2.value.integer.value = 0;

          CB3.value.integer.value = 0;


          2) You can call the importDataObject method from every PDF with JavaScript.

          In Designer it could look like:

          Form1.#subform[0].ImportBtn::click - (JavaScript, client)

          var ID = String(new Date().getTime());








          But, this method is generally not available for Adobe Reader users!

          Means, only if the form was extended with required rights by LiveCycle Reader Extensions.

          1 person found this helpful
          • 2. Re: LiveCycle Checkboxes and "Add Attachment" button
            BantonGET Level 1



            Thanks a bunch, first one works like a charm!


            The attachmentbutton however. I'm currently using a totally different script (found it online);


                  form1.#subform[0].Button1[1]::click - (JavaScript, client)


                 var AttachmentDescription = this.name;
                 AttachmentDescription.rawValue = "New Attachment" + AttachmentDescription.rawValue; 
                 var strAttachmentName = AttachmentDescription.rawValue; 
                 var myDoc = event.target; 
                 var objDoc = myDoc.getDataObject(strAttachmentName); 
                 var FileName = "";
                 FileName.rawValue = objDoc.path; 
                 //this.presence = "invisible"; 
                 AttachmentDescription.access = "protected";


            This works perfectly for me, but perhaps it's not compatible with the second button I need?

            Btw, I do have LiveCycle Reader Extensions.


            Again, thanks, and thanks in advance!

            Anton B.