Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #863610

    Hi Guys,
    i have made an update to Flashlight version 4.2 (…and to WP version 4.7.6).

    After these 2 updates you can’t see the user-input to the subject-field (…contact form) at incoming emails anymore.

    Since the update there is only a static output from the class-form-generator.php:
    “New Message”, ‘avia_framework’) . ” (“.__(‘sent by contact form at’,’avia_framework’).” “.$myblogname.”
    …so in every email you can read: “New Message (sent by contact form at Blogname)”.

    Have tried different things – which you can read all over the Enfold-Forum – with ‘add_filter’ at the functions.php for example:

    add_filter('avf_form_subject','avia_change_mail_subject', 10, 3);
    	function avia_change_mail_subject($subject, $new_post, $form_params)
    	{
    		$subject = "TextLine" . urldecode($new_post['1_1']);
    		return $subject;
    	}

    …or similiar:

    add_filter('avf_form_subject','avia_change_mail_subject', 10, 3);
    	function avia_change_mail_subject($subject, $new_post, $form_params)
    	{
    		$subject = urldecode($new_post['avia_4_1']);
    		return $subject;
    	}

    …but nothing works.

    With the code:

    
    $subject = "TextLine " . urldecode($new_post['1_1']);
    

    …i get “Textline” at the subject line in email-headers, but not the input from the subject input-field at the contact-form.

    …and YES, there was always a text at the input-field.

    Furthermore with the mozilla inspector i can’t find nowhere terms like -> ‘avia_4_1’, ‘avia_4_3’ or ‘1_1’, ‘3_1’ …

    At the webpage source code i can see the ID’s from the contact form (…comment-form.php):
    ‘avia_yourname’
    ‘avia_email’
    ‘avia_phone’
    ‘avia_subject’ and
    ‘avia_message’.

    Whats going wrong ?

    Thank you for your reply in advance.

    blogwaeltler

    #864608

    Hey blogwaeltler,

    Please, update the WP to the current version thats 4.8.2 and check the Enfolds version too.

    Best regards,
    John Torvik

    #864933

    Hi John,
    will try this at the weekend, but suppose it will be the same.

    Besides it is the Flashlight Theme. Could only found details to this “subject – error” at the Enfold forum.

    Best regards,
    blogwaeltler

    #866048

    Hi,

    If you don’t mind, please provide a link to the page with the contact form so that we can inspect the fields. The filter above should work but you have to adjust the form field id based on the current settings of the contact form.

    Best regards,
    Ismael

    #867617

    Hi Guys,

    as supposed with the current WP version 4.8.2 there is no other effect.
    I have made a new test-installation (without modifications) with the above named WP- & Flashlight version + a new sql db.

    You can’t see the entry from the subject field in the email header. Also with WordPress 4.8.2 & Flashlight 4.2 there is only the “static” output:

    “New Message (sent by contact form at ‘Blogname’)”

    …and YES, on every test was always a text at the input-field.

    Hi Ismael,
    the link to my new test-installation is at the Private Content field.

    Thanks,

    blogwaeltler

    #868484

    Hi,

    Thank you for the update. Please try the following filter.

    add_filter('avf_form_subject','avf_form_subject_mod', 10, 3);
    function avf_form_subject_mod($subject, $new_post, $form_params)
    {
    	$subject = "Subject: " . urldecode($new_post['subject']);
    	return $subject;
    }

    Best regards,
    Ismael

    #868635

    Hi Ismael,
    thank you for the new code snippet, but at the email-header you can see only the word “Subject: “.

    At the contact-form in the subject-input field was the text: “My Reservation for 24.12.2017”.

    A link to this snapshot you can find at the Private Content.

    Best regards,

    blogwaeltler

    #869104

    Hi,

    We removed the form id in the following line.

    $subject = "Subject: " . urldecode($new_post['subject']);
    

    Please try the code again. Don’t forget to remove browser cache before checking the page.

    Best regards,
    Ismael

    #869317

    Hi Ismael,

    this works!

    Thank you very much and have a nice weekend,

    best regards,

    blogwaeltler

    #869937

    Hi,

    Glad it worked. Let us know if you need anything else. Take care.

    Best regards,
    Ismael

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Contact-Form – No subject line in email-header after update to Flashlight 4.2’ is closed to new replies.