By default in 3.24.3 there is no keyword for me to print the URL or asset ID of a file uploaded to a custom form (which would be a really handy feature if it is not already in a later version, hint hint ). I needed to create an asset listing to print form submissions along with attachments uploaded to the form.
I figured that unless there is a ridiculous amount of traffic going on, the asset ID of an uploaded file is always going to be one greater than the custom form. So a little bit of math and jQuery helps me print a link to an uploaded file.
First set up an asset list to list form submissions as per the Custom Form manual.
This section goes in the Form Submissions Type Format of my asset listing:
(Replace XXXXXX with the ID of your question and Y with the question number, as you would normally do when printing form submissions.)
Now add a div within the Form Submissions Type Format where we want to print the link to the attachment, using the form submission's asset ID as the div ID: