Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1338910
    InEssenz
    Guest

    Hallo, ich nutze schon seit einigen Jahren das enfold theme in WordPress und bin auf dem aktuellen Stand. Bis vor kurzem zeigte mir, wenn jemand das Kontaktformular ausfüllte und an mich absandte, die E-Mail an mich in der Zeile von: den Namen des Absenders an. Mittlerweile ist es so, dass dort meine eigene E-Mail Adresse angezeigt wird und in der Spalte ANTWORT an: die Absenderadresse. Dies ist, insbesondere wenn auf diese E-Mail-Anfrage geantwortet werden soll recht umständlich.

    Frage: Gab es eine Programieränderung oder sonstige Veränderung wieso dies nun so der Fall ist?

    Ich habe intern keine Änderungen vorgenommen und auch keinen Hinweis darauf gefunden, ob ich etwas umstellen/verändern kann bzw. soll.

    Könnt ihr mir bitte weiterhelfen – besten Dank im voraus.

    #1339262

    Hey InEssenz,

    Thank you for the inquiry.

    You can use the avf_contact_form_incoming_mail filter to adjust the address in Reply-to field.

    add_filter("avf_contact_form_incoming_mail", function($mail_array, $new_post, $params, $class, $from, $from_filtered) {
         $mail_array["Reply-To"] = $new_post["2_1"];
         return $mail_array;
    }, 10, 6); 
    

    The filter above should retrieve the value of the email field in the contact form and apply it as the Reply-To address. Please note that $new_post contains the value of the fields in the contact form and the key “2_1” refers to the field order and the contact form ID, respectively. So the filter above should work fine if the email address field is the second field in the contact form. If the email address field is located somewhere else in the contact form, say it is the third field, make sure to update the $new_post key to “3_1”.

    Best regards,
    Ismael

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