Thanks Jamal,
I understand.
How do I enter multiple instances in a csv file - does each instance appear in a separate column? What's the column header?
If I load the names as repeater image field with the full url would that be OK?
Thanks for your help.
For support rules, we are able to handle only one issue at a time. This helps us to bring you a better service and also helps other users to find all the information here exposed. For that reason I have created another ticket to handle how to import repeating fields from CSV file, I'll post my reply there.
Hi Jamal,
I have this field:
plant images
<em><u>hidden link</u></em>, <em><u>hidden link</u></em>, <em><u>hidden link</u></em>
It's a single line text field. The text is a comma separated list of 3 images (with url). The 3 images exist in the media library, but I'm receiving "no image available". Is it possible to display the 3 images from the comma separated list in the single line text field.
This is the code I'm using with [wpv-for-each field="wpcf-plant-images"], which you suggested, but without success.
<!-- carousel start -->
<div id="carouselExampleControls" class="pic carousel slide" data-ride="carousel">
<div class="carousel-inner">
<ol>[wpv-for-each field="wpcf-plant-images"]<li>[wpv-post-field name="wpcf-plant-images"]</li>[/wpv-for-each]</ol>
[wpv-for-each field="wpcf-plant-images" start="1" end="1"]
<div class="carousel-item active">
<img src="[wpv-post-field name='wpcf-plant-images']" alt="No picture currently available">
</div>
[/wpv-for-each]
[wpv-for-each field="wpcf-plant-images" start="2"]
<div class="carousel-item">
<img src="[wpv-post-field name='wpcf-plant-images']" alt="No picture currently available">
</div>
[/wpv-for-each]
</div>
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<!-- carousel end -->
Thanks for your help
ps
If I have a single image to display this code works - so if I understand the wpv-for-each loop needs to take the images from the ol,li list and not from the wpv-post-field.
Hello David,
Theoretically, you can display images, separated by a comma(,) inside a single-line text field. But that is not possible using the wpv-for-each. You need to build your own shortcode for that.
To use the wpv-for-each shortcode, you need to have a repeating field. Each image's name needs to be in its own instance and not on one instance and separated by comma(,). That's just not possible with Toolset shortcodes.
Conclusion: You CANNOT use wpv-for-each with a comma separated list.
All the best,
Jamal
My issue is resolved now. Thank you!