Tagged: CONTACT FORM
-
AuthorPosts
-
October 18, 2021 at 9:13 am #1325369
Good morning,
I want to set in contact form autoresponder the logo and the information of the society (like email signature).
Can i use the contact form to do it or are they any other solutions?
Thank youOctober 19, 2021 at 4:52 am #1325506Hey WURZ8,
Thank you for the inquiry.
You can use the avf_contact_form_incoming_mail filter to adjust the email configuration including the emailMessage. You could also create a completely new email template from scratch using the same filter.
Example:
add_filter("avf_contact_form_incoming_mail", function($mail_array, $new_post, $params, $class, $from, $from_filtered) { $logo = "<img src='LOGO URL' />"; $mail_array["Message"] = $logo . $mail_array["Message"]; return $mail_array; }, 10, 6);This should prepend an image before the message. You can also use the avf_form_mail_form_field filter to adjust the layout of the email message per line. Default layout is..
Form Field Label : Form Field Value '';Example:
Email : (Email address hidden if logged out) Number : +1234567890 Message : What's up Doc?Best regards,
IsmaelOctober 19, 2021 at 8:26 am #1325525This reply has been marked as private.October 20, 2021 at 4:16 am #1325653Hi,
Thank you for the update.
You have to add the filter in the functions.php file via the Appearance > Editor panel or directly through FTP. Please note that the $new_post variable is an array which contains the value of the form fields. You can use those values to create a completely different Message template if necessary, but that may require a bit of customization, which is beyond the scope of support.
Related threads:
// https://kriesi.at/support/topic/autoresponder-function-php-code-not-working
// https://kriesi.at/support/topic/contact-form-elements-via-php-functionsBest regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.
