Skip to content

Commit

Permalink
fix(tagfield): show in saved answers the tag names
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Jul 4, 2019
1 parent 47db2d8 commit 19a6c2b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion inc/fields/tagfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,17 @@ public function displayField($canEdit = true) {
});");
} else {
echo '<div class="form_field">';
echo empty($this->value) ? '' : implode('<br />', json_decode($this->value));
$tagNames = [];
if (count($this->value) > 0) {
foreach ($this->value as $tagId) {
$tag = new PluginTagTag();
if (!$tag->getFromDB($tagId)) {
continue;
}
$tagNames[] = $tag->fields['name'];
}
}
echo implode(', ', $tagNames);
echo '</div>';
}
}
Expand Down

0 comments on commit 19a6c2b

Please sign in to comment.