I’m building a multi-site that needs to have functioning “Contact Us” forms for each location’s website. These have different email addresses, so I created a custom field for the email address to be entered using ACF. The Form is coded using HTML & PHP. I am trying to figure out how to get the contact forms to email to the separate emails by referencing the specific email address field. Coded like this so far (not working):
That is just the top part. Upon submitting the form, I only get a blank page in return. When I remove the above ACF field reference and replace that section with an actual email address, the form does work. So i know it is something in the code.