@bill_hodgson,
I was confused on this at first as I know this is working, so I just went through and setup the exact same situation on my local site by adding an ACF Pro field to my page, calling it “Reference” with a slug of reference
, and then inputting a random string.
I then wired up Website enquiry on {{dc:post:title}} ({{dc:acf:post_field field="reference"}})
as the “Subject” line for a mailto:
link using the Button Element. When I output all of that on the frontend of my site and click on the Button, I can see that it is working properly:
After that worked, I then tried pasting in your exact string and got an error. After puzzling for a moment, I noticed that one of your "
which should be showing up as plain text double quote is instead a styled double quote. Check the ”
at the end of reference
below:
Website enquiry on {{dc:post:title}} ({{dc:acf:post_field field="reference”}})
Perhaps you copied this in from a rich text-editor somehow, but always ensure that your strings are escaped to plain text. If you delete that styled double-quote and replace it with a normal one, this should be working for you.
Hopefully that helps!