Quote:I can view the lightbox image when I edit the submission and click on the file name, however I can only view the file name when exporting html.
Yes, by default, the HTML / Printer-friendly content (defined by the Export Manager) just links to the files - not embeds them in the page. But it's not too tricky to tweak - everything in the HTML generated pages can be edited so you can make them look however you want.
Just so we're on the same page: the Export Manager handles the actual HTML generation. So to edit it, go to Modules -> Export Manager -> select the HTML / Printer-friendly format -> click on the "Export Types" tab. Here, it lists the three Smarty templates which are used to generate the three.
That's the bit you'll need to edit.
Here's a quick example. I've modified the "Table format" export type to handle displaying files a little differently. Specifically, it assumes that all file fields are IMAGE fields (if this isn't the case for all your forms, let me know and I'll explain how to tweak it to only display the image for specific file fields).
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"}
<img src="{$field.field_info.settings.file_upload_url}/{$value}" />
{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}
{else}
{$value}
{/if}
</td>
{/foreach}
</tr>
{/foreach}
</table>
The new lines that I added are:
Code:
{elseif $field_type == "file"}
<img src="{$field.field_info.settings.file_upload_url}/{$value}" />
Does this help at all? Let me know if you need help tweaking the other templates or anything else. I confess that this functionality IS more heavily geared towards programmers than end-users, unlike other aspects of the software. But ultimately I thought it was important to provide as much functionality as possible, hence the added complexity.
Quote:I very much need to know where to edit the format of the html export page. I have looked in the module- Export Manager and found this line commented in the start of the php:
"It calls the export.tpl found in the /modules/export_manager/templates folder."
However I found no such file: export.tpl
Nope! Wow, that comment is VERY out of date.
I'll have to find & remove it. The actual HTML is generated via the Export Manager UI, as mentioned above.
Quote:I have also looked for a way to do this using the api, however that documentation is apparently incomplete
Ah, thanks for this. I'll update that page right now.
Hope the above helps a bit...!