Home Forums General Issues Dropdown for pre-formatted HTML code?


Dropdown for pre-formatted HTML code?

  • Here’s what I am trying to achieve: in a repeater field I’d like there to be a dropdown that when I select it then a specific simple line of HTML is inserted into the loop…

    Is that possible? I am sure it is – if so, can someone point me in the right direction pls?

    The simple line of code would be even as simple as this:


    ^ and this would be hardcoded.

    But there would be several of these, up to 30 links…and I just select one that would be inserted into the loop…

    Thanks for all replies

  • The random “anchor” was HTML code that the original post removed…

    What I meant by “simple line of code” was a URL, i.e.

    <a href="">Anchor</a>


  • No, this is not possible. ACF select fields (choice fields) do not support HTML in values.

    You would have to create these links in code. This could be done using an acf/format_value filter for the field.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.