Displaying user uploaded images in a print template or text about thank you page

Good afternoon

Some users ask how to display images uploaded to the form using the "File Upload" field in the print template or successful submission. In this article, we will tell you how to implement this function.

You need to go to the form editor and select "Page for printing":

Displaying user uploaded images in a print template or text about thank you page 1

On the example screen, the action about successful sending is selected - Redirect to the page for printing. Click edit.

In the page template for printing, select a template and click edit template:

Displaying user uploaded images in a print template or text about thank you page 2

Important! If programming elements are added, this template must always be edited in an HTML editor. Therefore, you must first configure the template itself, and then add programming elements.

Displaying user uploaded images in a print template or text about thank you page 3

On the example screen, the action about successful sending is selected - Redirect to the page for printing. Click edit.

In the page template for printing, select a template and click edit template:

Displaying user uploaded images in a print template or text about thank you page 2

Important! If programming elements are added, this template must always be edited in an HTML editor. Therefore, you must first configure the template itself, and then add programming elements.

Displaying user uploaded images in a print template or text about thank you page 3

In the HTML editor you need to add the following code:

 {{ field123456_url|split(' ')|map(url => "<div><img src='#{url}' alt='' /></div>")|join('')|raw }}

Where field123456 is the macro for the "File Upload" field.

Displaying user uploaded images in a print template or text about thank you page 4

Click save and also save in settings:

Displaying user uploaded images in a print template or text about thank you page 5

Displaying user uploaded images in a print template or text about thank you page 6

Click save and also save in settings:

Displaying user uploaded images in a print template or text about thank you page 5

Displaying user uploaded images in a print template or text about thank you page 6

Comments

Order turnkey form development

No time to figure out all the settings yourself? No problem!
Order web form development from us