This is all very useful tx, maybe my idea of data attributes for the front end is not so silly after all but the idea of some inline js is also great. I was almost there with two different init scripts for front end [vanilla] and back end [jQuery], I think I now know the best approach to pursue. The approaches you provided make a lot of sense.
wp_localize_script() is very useful too – I didn’t know that function.
Thank you for your time spent responding to this.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!