Images uploaded via the File Upload question show up as links in the body of an email message from the Send Email action, as well as the optional PDF review file you can attach. If you'd like to see the actual image as part of the PDF review, follow these steps!
One note: the greater the time between when the image is uploaded and when the Send Email action fires will ensure that the file has made it to the Amazon cloud where our images are stored. Ideally, your File Upload question is near the beginning of a survey and your Send Email action is on the Thank You page with at least a page or two in between.
- You'll need a survey with a File Upload question to get started. The File Upload Security setting must be disabled for this scenario.
- The link for all files uploaded to your account will have the same URL base:
- You will need to replace the three bolded pieces of the above URL. You can find your account ID by clicking Account > Summary > Account Overview. This will only be accessible by Account Administrators.
The survey ID is located in the URL bar when you're building the survey.
Now you're ready to build the link for the Hidden Value.
- The last piece of the link is a merge code for the name of the uploaded file. On any page that follows the File Upload question, add a Hidden Value action.
- Under the Populate with the following field you will see the option to Insert Merge Code.
- Give that a click and then select the File Upload question from the dropdown menu then click Insert. You will get a merge code similar to this one:
- Now all you need to do is put it all together into an image link with your Account ID, Survey ID and merge code for the File Upload question. Once you've constructed your image link put the link in the Hidden Value action you just created (you can delete the Merge Code once you've created your image link).
<img src='http://surveygizmoresponseuploads.s3.amazonaws.com/fileuploads/193520/1832522/[question("value"), id="5"]'/>
- Once that step is complete, you can build out the rest of your survey as usual. Once you get to the Thank You page, add a Send Email action. In the action, click the Advanced tab and select the Attach a PDF Review option and then make sure the Include hidden values is selected as well.
- Once all that is done, try taking your survey to see how it works! If you want to try it out, here's the example survey we built to write this tutorial:
Include an Image Element from Your Survey in PDFs
Image media elements are not available to include in PDFs. You'll want to instead use a Text/Instructions element. Here's how:
- Go Account > Libraries > File Library and find the image you wish to include in your PDF.
- Click Edit on the image in question and copy the Embed Code to your clipboard.
- Next, go back to your home page by clicking the Home icon. Find your survey and go to the Build tab. Just above or below your image element (it doesn't matter which as we're going to delete the image momentarily) click to insert Text/Media.
Instead of an image element we are going to keep the default selection of Text/Instructions. Enter some temporary text (we'll replace this in a moment) and click Save Text/Media and Edit.
- Next, access the source code of your text element by clicking the ... icon followed by Source. Replace your temporary text with the image embed code from your clipboard and click Save Text/Media.
- Next, delete the duplicate image element from your survey. Make sure you are deleting the Image element and not the Text/Instructions that you just added!
- Finally, when downloading PDFs, be it Individual Response, Review Action, or Send Email PDFs, be sure to select the option to Include text/instruction from survey.
If you find that your image is too big or altogether not an ideal size, you can add width and height parameters to the image embed code:
<img src="http://surveygizmolibrary.s3.amazonaws.com/library/12345/smile.png" height="100" width="100" />
Replace the values associated with the height and width parameters to adjust your image size.