Viewing 4 replies - 1 through 4 (of 4 total)
  • The default in Settings for sender name says Custom Contact Forms.. so I wanted to swap this for the sender’s name. This is so I could reply to the email from the website and it looks like I’m replying to the sender.

    I opened this file

    custom-contact-forms-front.php.php

    As per your question about the subject, that would be edited on line 591

    $mail->Subject = (!empty($form->form_email_subject)) ? $form->form_email_subject : $admin_options['default_form_subject'];

    I was fixing the sender name being hardcoded… here’s my fix incase you want to do that too

    and around line 576 is this bit of code

    $from_name = (empty($admin_options['default_from_name'])) ? __($_POST['ccf_name'], 'custom-contact-forms') : $admin_options['default_from_name'];

    I swapped the hardcoded Custom Contact Forms text for this POST value $_POST[‘ccf_name’] – and it works

    Thanks
    Rob

    Thread Starter 1key

    (@1key)

    I’m a bit confused.
    So i’m editing line 591 and 576 to be:
    $from_name = (empty($admin_options[‘default_from_name’])) ? __($_POST[‘ccf_name’], ‘custom-contact-forms’) : $admin_options[‘default_from_name’];

    whats the exact edit?

    [Moderator Note: No bumping, thank you.]

    I changed the line to this and it worked:
    $from_name = (empty($_POST['ccf_name'])) ? __('Custom Contact Forms', 'custom-contact-forms') : $_POST['ccf_name'];

    Thread Starter 1key

    (@1key)

    Thanks guys it worked!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Make email subject be persons name automatically’ is closed to new replies.