Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #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

    #702116

    Hi 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,
    Basilis

    #703408

    I added the code, however the from Email address that gets submitted is the default wordpress email, not the user submitted one.

    #704552

    Any update?

    #704608

    Hi,

    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,
    Nikko

    #704971

    You should see it all below! Let me know once you find something.

    #706542

    Hi,

    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,
    Ismael

    #711345

    That 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.

    #712386

    Hi,

    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,
    Andy

    #1208445

    Where’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, 7 months ago by Samuel.
    #1208995

    Hi 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,
    Nikko

    #1209392

    Got it! Thanks.

    #1209696

    Hi Samuel,

    Glad we could help :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.