<p>If you must insist on using such a long field name rather than putting it in your twig template, then this code should work:</p>

<pre><code>{% set field = craft.fields.getFieldByHandle('fieldName') %}

{% for blockType in field.getFieldType.getSettings.blockTypes %}
    {% if blockType == 'pet' %}
        {% for field in blockType.fields %}
            {% if field.handle == 'aggressiveBehavior' %}
                {{ field.name }}
            {% endif %}
        {% endfor %}
    {% endif %}
{% endfor %}
</code></pre>

CC BY-SA 3.0
2017-05-27T21:32:32.063Z
2017-05-27T21:32:32.063Z
Ben Croker
<p>I believe that it is not possible looking at the <a href="https://craftcms.com/docs/templating/matrixblockmodel" rel="nofollow noreferrer">Matrix Block Model Docs</a>.</p>

<p>What I would usually do, instead of having the front end facing title as the Field Name, is keep the Field name solely for the back end.</p>

<p>An example be (for a front end form)</p>

<pre><code>&lt;label&gt;{{ 'Is your pet ever aggressive to strangers?' | t }}&lt;/label&gt;
{% for option in matrixBlock.aggressiveBehavior.options %}
&lt;input type="radio" name="aggressiveBehavior" value="{{ option.value }}"&gt;{{ option.label }}
{% endfor %}
</code></pre>

CC BY-SA 3.0
2017-05-24T19:28:38.680Z
2017-05-24T19:41:16.257Z
2017-05-24T19:41:16.257Z
JHEUNG
<p>I have matrix field set up, is that possible to output Name in Field Settings (refer to the handle: aggressiveBehavior)? Thanks</p>
<p><a href="https://i.sstatic.net/0GWyg.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/0GWyg.png" alt="enter image description here" /></a></p>

CC BY-SA 3.0
2017-05-24T19:18:27.833Z
That's a crazy long field name! Seems like most of that should go under the "Instructions".
Lindsey D
CC BY-SA 3.0
2017-05-26T16:55:05.247Z
The client wants it to show the question as the title, not the instruction, that's why we put it in the name field. I guess we need a separated field to store it. Thanks
Angela Chan
<matrix><output>
How to output Name in Matrix entries
# How to output Name in Matrix entries

(Asked by: username_0 on 2017-05-24)

I have matrix field set up, is that possible to output Name in Field Settings (refer to the handle: aggressiveBehavior)? Thanks

[![enter image description here](https://i.sstatic.net/0GWyg.png)](https://i.sstatic.net/0GWyg.png)

**Tags:** matrix, output

> **Comments:**
> **username_1**: That's a crazy long field name! Seems like most of that should go under the "Instructions".  
> **username_0**: The client wants it to show the question as the title, not the instruction, that's why we put it in the name field. I guess we need a separated field to store it. Thanks  

---

## 2 answers

### Answer by username_2 on 2017-05-27. Score: 1 | Accepted answer

If you must insist on using such a long field name rather than putting it in your twig template, then this code should work:
{% set field = craft.fields.getFieldByHandle('fieldName') %}

{% for blockType in field.getFieldType.getSettings.blockTypes %}
    {% if blockType == 'pet' %}
        {% for field in blockType.fields %}
            {% if field.handle == 'aggressiveBehavior' %}
                {{ field.name }}
            {% endif %}
        {% endfor %}
    {% endif %}
{% endfor %}


---

### Answer by username_3 on 2017-05-24. Score: 1

I believe that it is not possible looking at the Matrix Block Model Docs.
What I would usually do, instead of having the front end facing title as the Field Name, is keep the Field name solely for the back end.
An example be (for a front end form)
{{ 'Is your pet ever aggressive to strangers?' | t }}
{% for option in matrixBlock.aggressiveBehavior.options %}
{{ option.label }}
{% endfor %}


---

