I am trying to: Output file metadata (Title or alt text) for repeating file field
I expected to see: Some way to display different info for each repeating field
Instead, I got: Same title for all files.
Currently in my content template, I'm using this for outputting repeating file fields:
<h3>Addenda:</h3>
<ol>
[wpv-for-each field="wpcf-addenda"]
<li>[types field='addenda' link='true' title='Addendum' separator=''][/types]</li>
[/wpv-for-each]
</ol>
Result:
1. Addendum
2. Addendum
3. Addendum
...
Is there any way to include file meta in the foreach loop?
What I'd like to see is:
1. Addendum - 18 November
2. Addendum - 20 November
3. Addendum - 21 November
...
Where the date is the file upload date OR just output the title meta from the file (I could have the user edit the title when they upload the file).
I read in the documentation about using an index for repeating files, but that just talks about outputting ONE of the array.
Thanks for any help
Well, you display the same field for all iterations, so it's expected to get the same output for each.
Anyway, it is not possible to give a Multiple (repeating) Field type's items separate Titles or similar.
There was a request in regard, I added your voice there, and it has been considered, but I have no ETA for this.
A Custom Solution is visible under the below link:
https://toolset.com/forums/topic/print-out-file-name-in-view-template/#post-34741
I do hope this helps for now, and please let me know if I can be of assistance otherwise.
Hi, I am having the same question - would be nice if you can add one voice more to this request list...
Thanks and regards