Tagged: CONTACT FORM, enfold, from address
-
AuthorPosts
-
October 20, 2016 at 9:49 pm #702099
Is there a way to have contact forms send from the users email?
We have our emails set to go into a ticketing system, and it comes as from us, so we are unable to reply directly to the user without having to manually copy/paste their email and open a new ticket.
I know Contact Form 7 is good, but would rather not use an additional plugin
October 20, 2016 at 10:25 pm #702116Hi mattbrooks123!
Here are two functions that will pick up from email and subject from what the user entered – you can change them to suit your needs. Put them in your functions.php.
// Avia Contact Form related functions add_filter('avf_form_from', 'avia_change_from', 10, 3); function avia_change_from($from, $new_post, $params){ if (!empty($new_post['e-mail'])) { $from = urldecode($new_post['e-mail']); } return $from; } add_filter('avf_form_subject', 'avia_change_subject', 10, 3); function avia_change_subject($subject, $new_post, $params){ if (!empty($new_post['subject'])) { $subject = urldecode($new_post['subject']); } return $subject; }
Best regards,
BasilisOctober 24, 2016 at 7:55 pm #703408I added the code, however the from Email address that gets submitted is the default wordpress email, not the user submitted one.
October 26, 2016 at 10:45 pm #704552Any update?
October 27, 2016 at 12:31 am #704608Hi,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
Login credentials include:
- The URL to the login screen.
- A valid username (with full administration capabilities).
- As well as a password for that username.
- permission to deactivate plugins if necessary.
Best regards,
NikkoOctober 27, 2016 at 7:22 pm #704971You should see it all below! Let me know once you find something.
November 1, 2016 at 5:40 am #706542Hi,
Is this the contact form? https://lmsdev.advancedministries.com/contact/
Please replace the code in the functions.php file.
add_filter('avf_form_from', 'avf_change_cf_from', 10, 3); function avf_change_cf_from($from, $new_post, $form_params) { $from = urldecode($new_post['2_1']); return $from; }
Do you have any smtp plugin installed? Note that this might not work properly on certain email server configurations.
Related thread: https://kriesi.at/support/topic/contact-form-emails-no-longer-working/#post-635068
Best regards,
IsmaelNovember 11, 2016 at 9:28 pm #711345That is the form, but the code didn’t work :(
I don’t have an SMTP plugin installed, but maybe our host does something different. The host is called FlyWheel.
November 15, 2016 at 10:29 am #712386Hi,
please talk about this with your host. However, I think using Contact Form 7 plugin would be the best option for you. It works well with Enfold.
Best regards,
AndyApril 30, 2020 at 5:18 am #1208445Where’s the functions.php file? If I edit functions.php, will I have to edit it every time there’s a theme update?
I would like to have a unique subject line for each form, how do I do that? Thanks.
- This reply was modified 4 years, 6 months ago by Samuel.
May 1, 2020 at 10:53 pm #1208995Hi Samuel,
If you put it in the functions.php of your child theme then it won’t get lost during the theme update.
You can download and find instructions on how to use it here: https://kriesi.at/documentation/enfold/child-theme/Best regards,
NikkoMay 4, 2020 at 4:40 am #1209392Got it! Thanks.
May 4, 2020 at 7:53 pm #1209696Hi Samuel,
Glad we could help :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.