Why bother ask? Just send them a copy.
Client needs this function. Btw this isn’t an impossible thing since there were 2 options to achieve this, but after a few updates in CF7 and WP this code isn’t working.
why bother answering? just ignore this thread if you don’t know the answer.
why bother answering? just ignore this thread if you don’t know the answer.
No need to be snarky, this is a volunteer forum. I would have coded it for you if you’d asked.
First of all, this thread is about I asked for help so it doesn’t seems necessary to ask again after you’ve proved the opposite you’ve just said the last time.
Secondly I’ve solved it and completly changed the code and it’s working now, so I mark this topic as resolved.
Have a nice day, and don’t stop helping others with these great answers like “why doing that, do something else insteed”.
Let’s all be friends 🙂
Glad you got it working, ricomester, would you mind sharing with us how you achieved it? Others might have the same question and might stumble upon the thread and if you could explain it that would be awesome!
RE: Have a nice day, and don’t stop helping others with these great answers like “why doing that, do something else insteed”.
Sarcasm like this is not only contary to WordPress Forum guidelines but a major red flag for many volunteers that help out in the forums by answering questions.
It is never appropriate IMHO.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Wait, @ricomester you can save this thread by providing the solution so that other people can benefit from the answer.
@buzztone: if you read carefully I didn’t offend any volunteer, Jason Hendriks was a troll. I came here to find an answer and obviously I needed an answer to that thing, not a possible other solution insted of what I asked for, so in my opinion that was a useless comment to the topic (= trolling, not volunteering)
And for the solution, to achieve this with the latest wp core and cf7 paste this to your theme’s functions.php:
add_filter( 'wpcf7_additional_mail', 'wpcf7_send_mail_to_self', 10, 2 );
function wpcf7_send_mail_to_self( $additional_mail, $cf ) {
$cf = WPCF7_Submission::get_instance();
$posted_data = $cf->get_posted_data();
if ( "Másolatot kérek" != $posted_data['send_c'][0] )
$additional_mail = array();
return $additional_mail;
}
and this line to your CF7:
[checkbox send_c default:1 "Másolatot kérek"] /* Másolatot kérek > send me a copy */
make sure mail2 is checked on the Email tab and paste [your-email] to the “To” section.
So after someone press submit it’ll check if “send_c” checkbox is checked and if do so than it allows mail2 to send, and if not checked it won’t send it.
Tested and working. And of course make sure you change the “Másolatot kérek” part in the functions.php to the one you set to the label of your checkbox.
@ricomester – Jason Hendriks is definitely not a troll. He has helped hundreds of people in this forum with his detailed answers to their particular questions.
Your comment was clearly offensive which is why I reported this post to WordPress Forum moderation.
I don’t care if you reported couse’ your buddy cried to you. I don’t know him from the past, he ain’t helped me before nor to my friends, so this was the first meet when I asked something and he came here asking why I want to achieve what I want to achieve, do something completly different.
And besides his answer is degrading. Anyone can go to the settings and check that box.
So cry somewhere else, the answer is there for my own question, if someone needs it, he can find it.
Have a nice day!
@ricomester: Hey man, calm down. This is a free forum, people helping other people. Getting annoyed or angry at people on the internet never ends well, because it’s a bit dumb.
Since this thread isn’t going anywhere, I’m closing it. Let’s try to keep our tempers in the future, fellas.