Skip to content

Commit

Permalink
fix for matrix-table a multiple blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Jun 21, 2016
1 parent 33c139c commit 75ee542
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions feedme/services/FeedMe_FieldsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,27 @@ public function prepTable($data, $handle, $field) {
$rows = ArrayHelper::stringToArray($data);

foreach ($rows as $i => $row) {
// Check for false for checkbox
if ($row === 'false') {
$row = null;
}
if (is_array($row)) {
foreach ($row as $j => $r) {
// Check for false for checkbox
if ($r === 'false') {
$r = null;
}

$fieldData[$i+1] = array(
'col'.$columnHandle => $r,
);
}
} else {
// Check for false for checkbox
if ($row === 'false') {
$row = null;
}

$fieldData[$i+1] = array(
'col'.$columnHandle => $row,
);
$fieldData[$i+1] = array(
'col'.$columnHandle => $row,
);
}
}
}

Expand Down

0 comments on commit 75ee542

Please sign in to comment.