I’ve tried something like this before, and it didn’t work. This time it did. The first bit of code was copied/adapted from a previous project (where it works) because trying it this way didn’t work in the previous project.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users