dynam
-
I’m trying to create a form that will email to the email address on the page.
I saw some tutorials that said I could use dynamic fields, but they don’t seem to work.I have a function that returns the email address but I’m not sure what to do with the actual form.
I tried adding a field
[dynamictext recipient-email uneditable "testid"]
where testid is my function calling the email, but it directly outputs that code and I don’t see anything on dynamictext fields. Can someone let me know what to do?I also tried this code:
function wpd_cf7_handler($contact_form) { $form_id = $contact_form->posted_data['_wpcf7']; if ( $form_id == 760 ) { // Everything you should need is in this variable //get the member id $memberemail = $contact_form->posted_data['testid']; //change the mail recipient... $contact_form->mail['recipient'] = $membermail; //var_dump($member); var_dump($contact_form); // I can skip sending the mail if I want to... //$wpcf7_data->skip_mail = true; } } add_action("wpcf7_before_send_mail", "wpd_cf7_handler");
BUt it’s not working either. Even trying to dump $contact_form.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘dynam’ is closed to new replies.