The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Export manager - Smarty Template - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Modules / Other (https://forums.formtools.org/forumdisplay.php?fid=8)
+--- Forum: Modules (https://forums.formtools.org/forumdisplay.php?fid=16)
+--- Thread: Export manager - Smarty Template (/showthread.php?tid=3043)



Export manager - Smarty Template - shpak - May 21st, 2014

Hello! Currently i'm testing Export Manager for functionality. I got 1 trouble.
Default HTML template is showing submissions line by line, like:
A B C D E F G
1 1 2 3 4 5 6
2 1 2 3 4 5 6
But i require to change it to that view and sum all values after Name of field:
A 1 2
B (2) 1 1
C (4) 2 2
D (6) 3 3
E (8) 4 4
F (9) 5 5
G (10) 6 6
How can i change it? I tried to play with Smarty Template but i not understand logic.
There is example of the Smarty Template code:
Code:
<h1>{$form_name} - {$view_name}</h1>

<table cellpadding="2" cellspacing="0" width="100%" class="print_table">
<tr>
  {foreach from=$display_fields item=column}
    <th>{$column.field_title}</th>
  {/foreach}
</tr>
{strip}
{foreach from=$submissions item=submission}
  {assign var=submission_id value=$submission.submission_id}
  <tr>
    {foreach from=$display_fields item=field_info}
      {assign var=col_name value=$field_info.col_name}
      {assign var=value value=$submission.$col_name}
      <td>
        {smart_display_field form_id=$form_id view_id=$view_id
          submission_id=$submission_id field_info=$field_info
          field_types=$field_types settings=$settings value=$value}
      </td>
    {/foreach}
  </tr>
{/foreach}
{/strip}
</table>

It will be great if you will help me to resolve it!
Core (2.2.6)
Export Manager (2.2.1)

Also, i have 1 more question. How to change Excel document style?
Thank you!


RE: Export manager - Smarty Template - Joe - May 21st, 2014

Hi there,

To add up the values you should take a look at the Submission Preparser module: http://modules.formtools.org/submission_pre_parser/

To change the layout you will need to make adjustments to the Smarty template.

To generate an Excel document, just output to Excel and click "Generate".

Cheers,

Joe