Expand my Community achievements bar.

SOLVED

attachments

Avatar

Level 4

Hello

I have been reading the various threads about adding attachments to PDFs.  Could anyone explain in more detail how to design a form so that if a user clciks a button they could add a file like a Word document, JPG etc.

Thanks

Darren

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Here is a sample that shows how to do it.

Paul

View solution in original post

13 Replies

Avatar

Correct answer by
Former Community Member

Here is a sample that shows how to do it.

Paul

Avatar

Level 4

That is great Paul.  Thanks and I will look through this.

Darren

Avatar

Level 4

Hi Paul

I have added a submit by email button to the pdf and tested it by attaching a PDF which works.

My next questions are:

1. On receipt of the email how do I access the attachment as it is an xml file.

2,     If I wanted to send your form so it attaches as a PDF rather than XML file so that I can use your launch button to access the embedded attachment how do I do that. Hope that makes sense.

Many thanks again.

Darren

Avatar

Former Community Member

1. On receipt of the email how do I access the attachment as it is an xml file.

<answer> The attachments are stored in the PDF document and are not part of the data. You would have to modify your submit button to hav eit send back the entire PDF instead of the data. Note that if you are using Reader you must Reader Extend the document to allow for this. Or you can have the users add the attachments to the email message instead.

2,     If I wanted to send your form so it attaches as a PDF rather than XML file so that I can use your launch button to access the embedded attachment how do I do that. Hope that makes sense.

<answer> I think you are asking how to get the attachments out of the PDF after they have sent them to you. Are you using Reader or Acrobat?

Paul

Avatar

Level 4

Hi Paul

I am using Acrobat so basically when I receive a PDF how would I get the attachments out of it.

Thanks again

Darren

Avatar

Former Community Member

Open the form and in the bottom left corner is a paper clip. Click on that and the attachment window appears. You can right click on the attachment you want and select the save option.

Paul

Avatar

Level 4

Hi Paul

Thanks!  So hopefully this is the last question.  I plan then to have a form with both data capture and attachments.  As the only way to include the attachments is for it to be a PDF file how would I then extract the data from the PDF file that the user has completedand sent to me when I receive it. 

Thanks again

Darren

Avatar

Level 4

Hi Paul

Just figured it out, in the forms tab of Acrobat.  When I click the submit by email button it attaches the PDF file with a temporary file name.  How do I change it to something like 'Darren's form'.

Thanks

Darren

Avatar

Level 4

Hi Paul

From a usability point of view I would like to change the message that is displayed when you click remove file and where no file has been highlighted in the listbox by the user.  Currently it displays 'null'.  Where in the code would I need to change this to display a custom message box so it says something like 'You must highlight a file name first in the listbox in order to remove it'.

Thanks again

Darren

Avatar

Former Community Member

The name of the file that is attached is the name of the PDF that is being sent. Beacause you are running from preview mode you are getting a temp name. Note that you cannot modify the file name in th eattachment....you may take the approach of saving the file with the name that you went then send it.

Paul

Avatar

Level 4

Hi Paul

That is great and works.  Many thansk for all your helpand assistance on this.

Darren

Avatar

Level 1

Hi Paul,

Just by reading above questions and answers I have learned a lot.  One question I have, how do I modify a submit by email button so I can receive the attachment in PDF instead of xml?

Thank you!

ih

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----