A workaround may be to create, in a Drag & Drop Designer a new tab with the Key/Value widget, to access in edit mode if needed.
For read-only mode, add in the main tab, a HtmlWidget with the following code :
<script>
document.write(expression.evaluate(
"'<ul>' || " +
"with_variable(" +
"'hstore'," +
"hstore_to_map(\"tags\")," +
"array_to_string(" +
"array_foreach(" +
"map_akeys(@hstore)," +
"'<li>' || @element || ': ' || map_get(@hstore, @element) || '</li>'" +
"), '', ''" +
")" +
")" +
"|| '</ul>'"
));
</script>
This will display a Html frame with the tags
values as a list like :
- alt_name: Mount King
- wikidata: Q59320
- wikipedia: en:King Peak (Yukon)
EDIT
If you want a pretty table styled with mouse hovering, you can add CSS style :
<style>
table {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
td, th {
border: 1px solid #ddd;
padding: 8px;
}
tr:nth-child(even){background-color: #f2f2f2;}
tr:hover {background-color: #ddd;}
th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #4CAF50;
color: white;
}
</style>
<script>
document.write(expression.evaluate(
"'<table>' || " +
"'<tr><th>Tags</th>' || " +
"with_variable(" +
"'hstore'," +
"hstore_to_map(\"tags\")," +
"array_to_string(" +
"array_foreach(" +
"map_akeys(@hstore)," +
"'<tr><td>' || @element || ': ' || map_get(@hstore, @element) || '</tr></td>'" +
"), '', ''" +
")" +
")" +
"|| '</table>'"
));
</script>
tags
fields in another tab ? – J. Monticolo Feb 14 '20 at 21:09