Skip to main content
Participant
January 15, 2022
Question

Attachment added to distributed form does not appear with form data

  • January 15, 2022
  • 1 reply
  • 692 views

I have created a form in Acrobat Pro that requires users to attach one or more files. I've used the Java Script code common to the support community to create a button to upload files and the files are correctly attached to the PDF (they appear in the Attachment section of the Navigation Window).  When the form is submitted, my FDF file contains all data except the attached files.  The Actions tab of the button Properties doesn't have an option for including Is there a way of including the attached files with the rest of the data? 

 

I can create a submit button that sends the PDF, including the attachments, to my email address, but then I can't collect the data into a response file for transfer it into a spreadsheet.

 

Is there a way both to transmit attachments and form data?

This topic has been closed for replies.

1 reply

Thom Parker
Community Expert
Community Expert
January 15, 2022

Yes, do individual submits for each.

Or just submit the PDF with the attachments and export the data in the PDF. You do know there is an option in Acrobat Pro for collecting data from multiple forms into a single CSV file.

 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
sib04Author
Participant
January 15, 2022

Thom,

 

I'm not sure what you're suggesting.  In the case of a single uploaded file, my button loads the file as an attachment.  When I distibute the PDF, I only get the one Submit button in the header and the collected response doesn't include the attachment.   I can create a Submit button within the PDF, but there's not an option to submit an attachment, with or without the other data.  Can you run me through an example or the steps you're suggesting, please.

Thom Parker
Community Expert
Community Expert
January 15, 2022

So there are a lot of ways to go about collecting data. First, if you just create a submit button that sends the entire PDF back, then as I think you already know, it'll include both the attachments and the entered form data. Then you can use the "Merge Forms" option to create a CSV of all the form data. This option is on the "More" popup menu on the right side panel in Prepare Forms mode. Here's a screen shot.

  

 

Alternatively, if the attachments are PDF files, you can create a  submit button that uses a script to open each attachment individually and submit it.  Here's are some articles on submitting data:

 

https://acrobatusers.com/tutorials/submitting-data/

https://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address/

 

And you'll find some general info on Acrobat form handling here:

https://www.pdfscripting.com/public/Form-Data-Handling.cfm

Although the article is mostly about locally controling form data, rather than submits. 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often