<p>There may be a better answer, but this is what I have come up with. Using Control Panel JS, combined with Preparse field(s), I am adding characters in like this</p>
<pre><code>{% for thing in entry.myMatrixField %}
  {{ thing.item }} - {{ thing.amount|number_format(2, '.', ',') }}^
{% endfor %}
</code></pre>
<p>And then using some basic jQuery to replace the ^ character with a line break. It's a bit clumsy, but it works. Now I can get Matrix fields to display in the control panel. <strong>Items</strong>, <strong>Budget line</strong>, <strong>Prices</strong> are all fields within my Matrix block. Just have to get them out separately.
<a href="https://i.sstatic.net/AWhgD.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/AWhgD.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2020-08-18T00:44:23.950Z
2020-08-18T00:44:23.950Z
4midori
<p>I can successfully use the Preparse field type to display matrix fields in the control panel, however, the output is very limited. <strong>Even my <br> tag is stripped out.</strong></p>
<p>Is there any way to do this short of writing a plug-in?</p>
<p>And if not, what is the simplest possible plug-in I could use as a base for this.</p>
<pre><code>{% for thing in entry.myMatrixField%}
  {{ thing.item }} - {{ thing.amount|number_format(2, '.', ',') }}&lt;br&gt;
{% endfor %}
</code></pre>

<matrix><control-panel>
Using Preparse field to display matrix blocks in Control Panel, limitations?
# Using Preparse field to display matrix blocks in Control Panel, limitations?

(Asked by: username_0 on 2020-08-17)

I can successfully use the Preparse field type to display matrix fields in the control panel, however, the output is very limited. Even my  tag is stripped out.
Is there any way to do this short of writing a plug-in?
And if not, what is the simplest possible plug-in I could use as a base for this.
{% for thing in entry.myMatrixField%}
  {{ thing.item }} - {{ thing.amount|number_format(2, '.', ',') }}
{% endfor %}

**Tags:** matrix, control-panel


---

## 1 answers

### Answer by username_0 on 2020-08-18. Score: 2

There may be a better answer, but this is what I have come up with. Using Control Panel JS, combined with Preparse field(s), I am adding characters in like this
{% for thing in entry.myMatrixField %}
  {{ thing.item }} - {{ thing.amount|number_format(2, '.', ',') }}^
{% endfor %}

And then using some basic jQuery to replace the ^ character with a line break. It's a bit clumsy, but it works. Now I can get Matrix fields to display in the control panel. Items, Budget line, Prices are all fields within my Matrix block. Just have to get them out separately.


---

