Hey John,
Ack, I feel kind of bad about this one. I just sat down to do it and found that there's actually a bug in the Export Manager that prevents the default file upload URL & folder get passed to the template for each field. So it needs a little trickery to figure it out... sorry!
[I logged the bug here, btw:
http://bugs.formtools.org/index.php?cmd=view&id=213]
Here's how to do it.
(1) On the Edit Form -> Fields tab, click the "Options" link for your image field. There, click the "Customize" button and select the "File Upload Folder" option in the first dropdown list. That will then display a bunch of info on that row. Don't change anything, just click "update".
What we did here is overwrite the default file upload settings for this particular field - but in fact, we didn't CHANGE anything, so the file upload folder and URL will still be the same as what you defined in the Settings -> Files page. The reason we did this was to force that information to get fed to the export manager so we can use it in the templates (this is the bug!).
(2) Go to Modules -> Export Manager and edit the HTML / Printer-friendly "Table format" export type. Enter the following smarty template content (better back up your old smarty template content, just in case):
Code:
<h1>{$form_name}</h1>
<table cellpadding="2" cellspacing="0" width="100%" class="print_table">
{* display the column headings *}
<tr>
{foreach from=$display_fields item=column name=row}
<th>{$column.field_title}</th>
{/foreach}
</tr>
{* loop through all submissions in this current result set, and display each item in a manner
appropriate to the field type *}
{foreach from=$submissions item=submission name=row}
<tr>
{foreach from=$display_fields item=field name=col_row}
{assign var=field_id value=$field.field_id}
{assign var=field_type value=$field.field_info.field_type}
{assign var=col_name value=$field.col_name}
{assign var=value value=$submission.$col_name}
<td>
{if $field_type == "select" || $field_type == "radio-buttons"}
{smart_display_field_values field_id=$field_id selected=$value}
{elseif $field_type == "checkboxes" || $field_type == "multi-select"}
{smart_display_field_values field_id=$field_id selected=$value multiple=true}
{elseif $field_type == "file"}
{if $form_id == 481 && $col_name == "image_file"}
<a href="{$field.field_info.settings.file_upload_url}/{$value}"><img src="{$field.field_info.settings.file_upload_url}/{$value}" width="100" /></a>
{else}
{$value}
{/if}
{elseif $field_type == "system"}
{if $col_name == "submission_id"}
{$submission.submission_id}
{elseif $col_name == "submission_date"}
{$submission.submission_date|custom_format_date:$timezone_offset:$date_format}
{elseif $col_name == "last_modified_date"}
{$submission.last_modified_date|custom_format_date:$timezone_offset:$date_format}
{elseif $col_name == "ip_address"}
{$submission.ip_address}
{/if}
{elseif $field_type == "textarea"}
{$value|nl2br}
{else}
{$value}
{/if}
</td>
{/foreach}
</tr>
{/foreach}
</table>
The bit we're interested in is this:
Code:
{elseif $field_type == "file"}
{if $form_id == 48 && $col_name == "image_file"}
<a href="{$field.field_info.settings.file_upload_url}/{$value}"><img src="{$field.field_info.settings.file_upload_url}/{$value}" width="100" /></a>
{else}
{$value}
{/if}
You'll need to change the form ID "48" value to whatever form ID you're interested in and the $col_name "image_file" value to whatever the column name is for your image field [to find that out, just go to the Edit Form -> Database tab].
Once I fix the export manager to always pass along the file upload URL and folders, you'll be able to go and delete the custom settings for that image field. But it's not strictly necessary.
And that's pretty much it... let me know how it goes!
- Ben