Skip to content

Display asset (name) in a submission overview #1688

Discussion options

You must be logged in to vote

Hi @FrDH,

You can access the AssetQuery directly on the FileUploadField via ::getAssets().

<dl>
  {% for field in allFields|filter(f => f.valueAsString and f.type in ['file', 'file_drag_and_drop']) %}
    <dt>{{ field.label }}</dt>
    <dd>
       {% for asset in field.assets.all %}
          url: {{ asset.url }}<br>
       {% endfor %}
    </dd>
  {% endfor %}
</dl>

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@gustavs-gutmanis
Comment options

Answer selected by kjmartens
Comment options

You must be logged in to vote
1 reply
@gustavs-gutmanis
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants