Tagged: autoresponder, CONTACT FORM, e-mail, email, Enfold contact form
-
AuthorPosts
-
September 18, 2014 at 12:09 pm #321101
Dear Kriesi team,
Would it be possible to use a variable name in the autoresponder text of the Enfold Contact Form element? A client wanted to use the name someone filled in on his site with the Enfold Contct Form, and use a “Dear |*FNAME*|, …” like construction in the autoresponder text. Is this possible or is this more something for a Contact Form 7, Gravity Forms, MailChimp sollution?
Kind regards,
Lucas van HeerikhuizenSeptember 19, 2014 at 10:54 pm #322141Hi Lucas!
Try adding this to your theme / child theme functions.php:
function modify_autorespondermessage_func($message) { $new_message = "Dear". $_POST['avia_nombre_1']."<br>"; $new_message .= $message; return $new_message; } add_filter('avf_form_autorespondermessage', 'modify_autorespondermessage_func', 10, 1);
Change “avia_nombre_1” by the name of the field you want to catch.
Regards,
JosueJune 30, 2015 at 6:56 pm #466627Hi Josue,
When add this to child theme function.php
– there is no space between name and Dear (DearJosue)
– between name and surname is %20 sign (DearJosue%20Moderator), and
– would like to have one more empty line after Dear Josue Moderator, before body message starts.Can you help with this?
June 30, 2015 at 11:52 pm #466738Hey!
Can you paste the code you’re using?
Regards,
JosueJuly 1, 2015 at 1:11 am #466751Hi Josue,
Sure I can:
function modify_autorespondermessage_func($message) {
$new_message = “Dear”. $_POST[‘avia_name_1’].”<br>”;
$new_message .= $message;return $new_message;
}
add_filter(‘avf_form_autorespondermessage’, ‘modify_autorespondermessage_func’, 10, 1);Btw, autoresponer emails are being sent more than two hours after form is submited? I know this is not connected with previous question, but, I just wonder if you have any idea why is that.
Best,
Ivan
July 1, 2015 at 8:31 pm #467225Hey!
Would suggest you putting another field for “surname” and change the code accordingly:
function modify_autorespondermessage_func($message) { $new_message = "Dear ".$_POST['avia_name_1']." ".$_POST['avia_surname_1']."<br><br>"; $new_message .= $message; return $new_message; } add_filter(‘avf_form_autorespondermessage’, ‘modify_autorespondermessage_func’, 10, 1);
Regards,
JosueJuly 2, 2015 at 12:28 am #467288Dear Josue,
Thank you so much for great help and really quick response! It works flawlessly!
Thanks again,
Ivan
July 2, 2015 at 1:03 am #467294You are welcome Ivan, glad to help :)
Regards,
JosueAugust 6, 2015 at 12:41 am #483631Hello. I opened a ticket similar to this…waiting to hear back. Thought I would try here as well to see if @simijonovic might be able to respond. I can launch this site once this final little piece gets implemented!!!
@josue – Your first section of code only returns “Dear” for me. Your second section of code returns nothing for me.My post.
Thank you!
Ryan -
AuthorPosts
- The topic ‘Add custom name to contact form autoresponder’ is closed to new replies.