Forum

Thread tagged as: Question, Forms

Accessing uploaded file in a Forms email template

Dear All,

I use a form that contains a file upload:

<perch:input id="abstract_file" type="file" accept="office" label="Abstract file" />

... then, I use an email template to send out a confirmation message. I would like to include the name of the uploaded file, but the following code does not seem to work:

<perch:email id="abstract_file" />

Please let me know if there is a way to access the uploaded filename in the email template, or at least whether a file was uploaded.

Thank you! Laszlo

Laszlo Grama

Laszlo Grama 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I'm not 100% sure it's available, but in the first instance, add the required type="file" to the tag.

In the second instance, see what <perch:showall /> outputs.

Dear Drew,

Thank you for your reply.

Unfortunately

type="file"

did not help and

<perch:showall />

does not list any fields related to the uploaded file.

The uploaded file name seems to be available though when I choose "No Template / Plain Text Only" for the Email Template on the Form Settings page, which outputs the file as "Attached filenames:". Maybe I'll switch back to that.

Thanks again, Laszlo