I'm asking this outside an entry context.

My starting point is

{% set field = craft.app.fields.getFieldByHandle('matrixFieldHandle') %}

When I print the data of the field, I find nothing related to the fields that matrixFieldHandle contains.

  • matrixFieldHandle (Matrix field)
    • Block Log
      • Field logValue (Dropdown field)

I know how to print the options in a dropdown field:

But how can I print all these dropdown options when it is set inside a Matrix?

  • What happens if you loop through field and print field.log?
    – Urs
    Commented Sep 6, 2018 at 15:02
  • I get a Twig Runtime Error: Calling unknown method.
    – Romain P.
    Commented Sep 6, 2018 at 15:06

1 Answer 1


This can be done like so...

{% set matrix = craft.app.fields.getFieldByHandle('myMatrixField') %}
{% for field in matrix.blockTypeFields if field.handle=='myDropdownField'  %}
    {% for option in field.options %}
        <option value="{{ option.value }}">{{ option.label }}</option>
    {% endfor %}
{% endfor %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.