Expand my Community achievements bar.

How to remove an attachment which is already prefilled in the form

Avatar

Level 3

Hi,

      We have a scenario in which we are pre filling attachments into a form using renderPDF service. We have a form which contains fields to attach the document, Attach button and Remove button. Now we are prefilling this form with some attachment coming from a database. We are able to associate the name of that attachment to the field. The problem is that we are not able to remove the attachment which was prefilled. The Remove button works properly only if the attachment is added on the form using the Attach button not when the attachment is prefilled.

Script for attach button:Click event

-----------------------------------

var iDoc=event.target;

iDoc.importDataObject("dataObject");

var oAttachment=iDoc.getDataObject("dataObject");

Script for Remove button:

--------------------------

var rDoc=event.target;

rDoc.removeDataObject("dataObject");

We want to know how can we remove an attachment from a form which is prefilled through Render PDF.

Thanks and Regards,

Leena Jain

1 Reply

Avatar

Former Community Member

Can you remove the atachment manually through Acrobat? Click on the paperclip icon (this will show your attachments), choose one of the trouble some attachments and right click it to remove it.

If that works then create a new PDF with those attachments and post your form.

Paul