Toggle menu

Embedding Images and Documents in Handlebars Templates

This form shows how to add files from the file upload field and iCM media library to your templates.

The two fields on the first page are optional, and validation has been set up so they will only accept certain file types.

Page two uses a server-side HTML template and the File Upload Helpers and Media Item Helpers. On page two you can download a copy of the form.

Display Rules Summary

The Handlebars helpers for uploaded files and media items, when they appear on your form or in the email/PDF generated by the email action field, behave as follows:

  • Uploaded images are displayed as a figure (ie embedded) in forms, and in PDFs generated by the email action
  • Uploaded images are not displayed in the email body. Instead the title is displayed, and the file may be attached to the email
  • Uploaded files (anything that isn't an image) are displayed as a link in forms. In the email body and in PDFs, the title is displayed and the file may be attached to the email
  • An image from the media library displays as a figure (ie embedded) in forms, but as a link in the email body and in PDFs
  • A document from the media library is displayed as a link in all cases

Share this page

Facebook icon Twitter icon email icon

Print

print icon