Good afternoon folks! I hope you’re having a great day. Just a quick question that I’m sure will be obvious to some of you, but I haven’t figured it out. I am creating a layout and am incorporating some ACF fields. I have written a javascript function within the “Single layout JS” code editor. How can I use dynamic content within this? I thought I would simply be able to do something like this;
var foo = ‘{{dc:acf:post_field field=“coordinates”}}’;
However, it doesn’t look like the actual value is being rendered. In the console it’s simply showing up as the text {{dc:acf:post_field field=“map_coordinates”}}. If I don’t wrap the DC in single quotes, I get the error Uncaught SyntaxError: Unexpected token ‘{’.
Can you give me a pointer please?
Thank you so much.