I have Webform Table Element installed (7.x-4.0-alpha0) and have found that webform fields that are contained within tables are not ouputing gracefully in Webform Report. For example:

a:10:{i:1;s:2:"99";i:2;N;i:3;N;i:4;N;i:5;N;i:6;N;i:7;N;i:8;N;i:9;N;i:10;N;}

This was a simple Number field, and should have displayed as 99 instead.

This applies to Webform Table Element versions 7.x-1.7, 7.x-1.x-dev, and 7.x-4.0-alpha0.

Comments

silurius’s picture

Issue summary: View changes

typo

silurius’s picture

Title: Webform Table Element - Reports outputting "Select options" fields that have multiple show gibberish in reports » Fiellds inside Webform Table Element output as gibberish in Weform Report reports

Clarified issue, changing title

silurius’s picture

Issue summary: View changes

Issue clarification

silurius’s picture

Issue summary: View changes

Yet another issue clarificaiton

MBroberg’s picture

Title: Fiellds inside Webform Table Element output as gibberish in Weform Report reports » Fields inside Webform Table Element output as gibberish in Weform Report reports

We have fixed this with custom PHP code on the criteria page. This is set for our table which has 10 rows and specific fields, so it is not generic but it at least gives a starting point.

<?php
  $matchString = "a:10:{";
  foreach ($rows as $i => $row) {
    foreach ($row as $j => $cell) {
      $contents = str_replace("&amp;", "&", $cell['data']);
      if (is_string($contents) && !strncmp($contents, $matchString, strlen($matchString))) {
        $items = unserialize($contents);
        $output = "";
        $separator = "";
        foreach ($items as $item) {
          if ($item) {
            $output .= $separator . $item;
            $separator = ", ";
          }
        }
        $rows[$i][$j]['data'] = $output;
      }
    }
  }
MBroberg’s picture

Issue summary: View changes

Version number corrections