Display File Upload Image in Submissions Directory
By default, the Submissions Directory listing in RSForm!Pro is not designed to display uploaded images directly. File upload fields are rendered as download links rather than inline images.
However, due to the flexible nature of RSForm!Pro, you can modify how uploaded files appear by using custom PHP scripts within RSForm!Pro's Submissions Directory feature.
This guide explains how to display uploaded images directly inside the Submissions Directory listing and the submission details area.
The Code
To display uploaded images in the Directory Listing, you need to modify the output using a PHP script. Edit your form's Submissions Directory, go to PHP Scripts > Scripts called on Listing Layout and add the following script:
$pattern = '#<a href="(.*?/' . preg_quote(Joomla\CMS\Language\Text::_('COM_RSFORM_SEF_SUBMISSIONS_VIEW_FILE')) . '/.*?)">.*?</a>#'; if (preg_match_all($pattern, $directoryLayout, $matches)){ foreach ($matches[0] as $i => $fullMatch){ $directoryLayout = str_replace($fullMatch, '<img src="'.$matches[1][$i].'"/>', $directoryLayout); } }
You can also display uploaded images inside the Details view of a submission. Edit your form's Submissions Directory, go to Details Layout section, disable the Auto Generate Layout option and insert the following placeholder where you want the image to appear:
{FileUpload_field_name:image}
Make sure to replace 'FileUpload_field_name' with the actual name of your File Upload field.


