Tagged: CONTACT FORM, request a quote
Hi,
I have a website with more products and, for each one, I have a “request a quote”, but i don’t’ know how to receive automatically the page of the request…
Can you help me please?
Looking forward hearing from you.
Best regards
MS
Hi MS,
Are you using a plugin for “Request a quote”? like https://wordpress.org/plugins/yith-woocommerce-request-a-quote/
Best regards,
Nikko
Hi, Nikko,
no I use the contact form provided from theme…
Best regards,
MS
Hi MS,
I see, you can add this PHP code in your child theme’s function.php:
add_filter('avf_form_subject','avia_change_mail_subject', 10, 3);
function avia_change_mail_subject($subject, $new_post, $form_params) {
$subject = $subject . ' - ' . $_SERVER['HTTP_REFERER'];
return $subject;
}
This will add the URL where the form was submitted and added after the subject.
If you aren’t using a child theme yet, then you can download it here: https://kriesi.at/documentation/enfold/child-theme/
And follow the instructions under Install a child theme from your WordPress dashboard.
Hope this helps.
Best regards,
Nikko
Done!
Thanks you!
Hi, It will be great if the link will be in the body of message.
Is possible?
Hi maryenvato,
Yes, it’s possible, use this PHP code instead:
add_filter('avf_contact_form_incoming_mail', 'avia_append_url', 10, 6);
function avia_append_url($mail_array, $new_post, $form_params, $class, $from, $from_filtered) {
$referrer = "\r\n URL: " . $_SERVER['HTTP_REFERER'] . "\r\n";
$mail_array["Message"] .= $referrer;
return $mail_array;
}
Best regards,
Nikko
Perfect!
Thanks you!
Hi maryenvato,
We’re glad that we could help you :)
Thanks for using Enfold and have a great day!
Best regards,
Nikko