Getting text from ACF into search field of icon inside component?

I’m trying to do something I’m not sure is possible or how best to approach it.

I have a collection of landing pages with an ACF field group. Inside this group, there’s a repeater field with a text field for the title, a textarea field for the content, and a text field for the icon name.

When I design my template, I want to be able to grab the icon name and search for it to display it in a component with an SVG block inside the repeater block.

Is this possible? What’s the best approach?

@Araminta Is this possible or can I open a new feature request?

Hi @J4VMC,

To achieve this, I would suggest using an Image ACF field, instead of a text field.

To do so, please see this step-by-step guide I created: Repeater: dynamic SVG

Please don’t hesitate to let me know if you have any questions on this.

@Araminta, Correct me if I’m wrong, but if I use an image field, I actually need to upload the SVG to that field. What I want to do is to make use of Cwicly’s built-in Phosphor icon collections and search for the icon from a text field. This way, I don’t need to upload the icon and I can change its style in the future, instead of having to re-upload it again.

Am I wrong or am I correct, @Araminta? I’d like to avoid uploading additional icons that already exist within Cwicly. That’s why I’d like to search for them by using an ACF text field.