Support

Account

Home Forums Gutenberg ACF Blocks, Javascipt API and field values Reply To: ACF Blocks, Javascipt API and field values

  • 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.

    Thanks for your help and advice – I missed in the docs the ACF javascript API being back end only.

    Thank you for your time spent responding to this.