Custom Form tag (ACF file URL) in the e-mail message
-
Hello,
I created a custom form tag, which returns ACF file URL:
<?php add_action('wpcf7_init', 'custom_acf_file_url_form_tag'); function custom_acf_file_url_form_tag(){ wpcf7_add_form_tag('acf_file_url', 'custom_acf_file_url_form_tag_handler'); } function custom_acf_file_url_form_tag_handler($tag){ $acf_field = get_field('produkt_schema', $post->ID); $url = $acf_field['url']; //create html and return $html = '<a href="'.$url.'" target="_blank">Download</a>'; return $html; } ?>
Now I need to send an e-mail to the customer with the URL. When I add [acf_file_url] to the e-mail body, it return only [acf_file_url], not actually $html;..
Any ideas on how to make it work?
Thanks, George
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Custom Form tag (ACF file URL) in the e-mail message’ is closed to new replies.