Using ACF to create a multi-media carousel

Boba
Tourist
10 0 0

Hello,

I was curious how one could combine two repeatable fields in ACF to create a series of slides. I have a section called "Slider" which is a repeatable section with two fields. Image and Video URL. Like so:

- Slider (Repeatable)
  Image - MediaV2
  Video URL - Text

I would love to just have been able to just use a single mediav2 field for image upload and video upload BUT we're not allowing videos to be upload but instead would like to have the user paste in a YouTube or Vimeo URL which unfortunately the mediav2 field type does not allow for something like that. Unless I missed something. What I'm hoping to do:

1. Check if the user purposely or accidentally uploaded AND pasted in a URL. If so we default to only showing the image. The image takes precedence.
2. Output the image or video in order that the repeatable sections are arranged. 

Is something like what I described doable with ACF and in my liquid template?

0 Likes