Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Update Number of Attachments Field

$
0
0


My form has a button for users to attach a file. Clicking the button opens a browse window allowing the user to select the file and attach it to the form. Each time this is done the NumericField1 increases by one. This shows users how many attachments there are.

 

I am trying to find script that wil update the NumericField1 if the user deletes one of the attachments. I can get it to work with a button but cannot get the script to run during the layout:ready event. How can I get this to run if the user deletes an attachment using the trash can icon in the attachments pane? Here's my button script:

 

var oObj = event.target;
var fileAttachments = oObj.dataObjects;
if(fileAttachments != null)
{
 Attachments.NumericField1.rawValue = fileAttachments.length;
}
else
{
 Attachments.NumericField1.rawValue = "0";
}

Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>