I’m using Wordpress, Elementor, Gravity Forms and Advanced Custom Fields (ACF) for a website collecting cycling cafes in NL and BE: www.wielercafes.nl.
On the page of every singular cycling cafe there is a simple contact form. I want this to be send to the emailadres of that particular cycling cafe. This emailadres is given using ACF at the backend. For now the contactforms are made with Elementor itself.
Is it possible to let the form send to the emailadres that is given to the particular cycling cafe?
If you are using Gravity Forms, you can pull that email address if it’s stored in a custom field on the post you’re displaying the form.
You can use the {custom_field} merge tag to populate a custom field from the post:
As an example, if you’re on the post for the Cycling Cafe and the email address is stored in a custom field called cycle_email, you could call that field with {custom_field:cycle_email} and it will pull that from the post the form is embedded on.
You can use that merge tag to set the default value of the email field on your form and hide it using Visibility: Hidden.
You can check the wp_postmeta table to see what the meta key name is. Based on the shortcode you shared, it might be emailadres_wielercafe. Try this merge tag (with curly braces):
The ACF Field configuration should give you the proper field name for wp_postmeta.
When you’re in ACF for the field, it’s the ‘field name’ field that contains that value: