Custom form email option


(Arctone) #1

Hi all

I’ve created a custom form with a file upload field. Submitted files are uploaded as assets in a folder under Form Contents.


Is it possible to link to the submitted file in a recipient email? If so what keyword replacements would I need to use?


(Bart Banda) #2

There was a new keyword added for this in matrix 5.2 sometime: %response_<parent_id>_<question_id>_file_id%  = The asset ID of a submitted file in the form submission, where <parent_id> is the ID of the Section of the form and <question_id> is the ID of the File Upload question

 

More info here: https://manuals.matrix.squizsuite.net/custom-form/appendices/keyword-replacements

 

Is that what you are after?


(Arctone) #3

Thanks Bart, this gives me the ID of the asset that was uploaded. How would I then turn this into a hyperlink that the email recipient can use to download the submitted file?


(Bart Banda) #4

Once you have the ID you can use the ^as_asset keyword modifier to get any attribute from the asset you want. So if you want the URl of the file, you could try:

 

%response_<parent_id>_<question_id>_file_id^as_asset:asset_url%