Firstly I want to thank you for such a great plugin.
I have ACF Pro and I created my custom fields. One of them is ‘Reference number’ is visible on the post page. On the same page, I have a simple contact form. I need to put the reference number from the post to the form and sent. I tried many options but I just can’t. Maybe someone has any idea how to do it?
this is my simple contact form:
[text* your-name placeholder "Your name"] [email* your-email placeholder "Your e-mail"] [textarea your-message placeholder "Message"] [submit "Send"]
this is the mail I want to send:
From: [your-name] <[your-email]> [your-message] Reference number: <?php the_field('reference_number'); ?>
I know this is impossible to work, but I just wanted to show you what am I thinking about.
this is the field I want to sent through the Contact Form 7:
<?php the_field('reference_number'); ?>
What you need is something is CF7 that will let you add a dynamic value to the form, ACF will not do that. You might want to take a look at this https://wordpress.org/plugins/contact-form-7-dynamic-text-extension/
I have similar problem, but when i try above it doesn’t work:(
I have a page where I have a custom field (by ACF) that displays an email address (in ACF it is named “adres_e-mail”). I want to use this field in a contact form 7 to send an e-mail to this address stored in the custom field “adres_e-mail”. How can I do it? I started with that I want to display this field with field
[dynamictext dynamictext “CF7_get_custom_field key=’adres_e-mail'”]
hoping that as I can display the field, that means it is stored in the correct field and I can use it in the TO e-mail field… But I can’t display this field. Nor the method “CF7_get_custom_field” or above method “acf field=’adres_e-mail'”. Please help!
P.S. of course iam using Contact Form 7 – Dynamic Text Extension
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!