Linking to files
You can link to any files uploaded on your form or any PDF documents generated on your form. Both uploaded files and PDF documents have their filenames stored in a field on your form. For example, when you add an upload field to your form and name it 'resume' , that field will hold the name of corresponding uploaded file. With PDF's, you specify the field that will hold the PDF filename when you create the PDF profile. For both types of files, the process of linking is the same:
FileLink Modifier Limitations
The fileLink modifier function can not be used on a form, and is only available on oputput segments such as autoresponders, notifications, PDFs and print/email templates. If you need to reference a file on a form (in a free text element for example, see the notes at the bottom of this article for instructions on getting the path)
Using the fileLink Wildcard Modifier to Link to a File
In the logiforms Rich Text Editor:
- Click the wildcard icon to select the field that contains the name of the uploaded file
- Right click on the field and select Apply Modifier Function & Insert
- In the Wildcard Functions window, scroll down and click the fileLink function.
- In the fileLink function window, you can enter the link text and select if you want it to open in a new window
- Click Save to complete the process
The wildcard is then inserted into the editor and wrapped in the modifier function. At runtime, this value will be replaced with the link to your file.
Showing Uploaded Images
You can also show any images uploaded on your form (Only web images (gif,jpg,png) are supported) from with your emails or on your AutoResponder thank you page. This is again done using the a WildCard Modifier:
Using the showImage Wildcard Modifier to show an uploaded Image
In the logiforms Rich Text Editor:
- Click the wildcard icon to select the field that contains the name of the uploaded file
- Right click on the field and select Apply Modifier Function & Insert
- In the Wildcard Functions window, scroll down and click the showImage function.
- In the showImage function window, you can force the width and height of the image or leave it on auto to show it at full size.
- Click Save to complete the process
The wildcard is then inserted into the editor and wrapped in the modifier function. At runtime, this value will be replaced with the image that was uploaded.
Manually Linking to an uploaded File
The fileLink modifier simplifies the process of linking to an uploaded file. In some case you may want to link to an uploaded file manually. This can be useful to link to a file within a Free Text Element on a form, or to reference a file uploaded from an alternate form. The steps to get the full path to an uploaded file are below.
Getting the path to an uploaded file:
- Get the form URL from the Integration Wizard
- Add "attachments" to the end of the form URL
- Finally, append the wildcard that holds the uploaded file name to the path.
The result should look something like this:
https://forms.logiforms.com/formdata/user_forms/60000_6449748/308936/attachments/[upload field name]You can use this path in an IMG SRC tag, or an EMBED tag to show an image or show a PDF for example.
Hide the link when no file was uploaded
Symptom: When someone submits the form without uploading a file, the generated PDF still shows the link, and it doesn't point to a file.
Cause: The link is built from the path to the form's attachments folder plus the value of the upload field. When no file was uploaded, the field is empty, so the link ends at the folder instead of a file.
Fix: Wrap the link in an inline condition so it only appears when the upload field has a value. Replace Upload with the name of your upload field:
{IF [Upload] <> '' THEN}fileLink([Upload], 'Click here to open the file','true'){ENDIF}The same condition works around a manual link to the file. To show text instead when no file was uploaded, add a second condition. Inline conditions have no ELSE:
{IF [Upload] = '' THEN}No file provided{ENDIF}To do the same without typing a condition, use Conditional Content:
- In the editor toolbar, click Conditional Content, then click Create New.
- Enter a Name, click Edit Rule, choose your upload field and IsNotEmpty, and click Save.
- Click Edit Dynamic Content, add the link, and click Save.
- Optional: click Edit Alternate Output, add text such as "No file provided", and click Save.
- Click Save, select the new segment, and click Insert Selected.

0 Comments