Adding data to subject line in Contact Form
Author: Matthew S.Is it possible to create a Contact Form that will insert one of the form fields into the email sent?
Example: The form subject line = Request for Product Information {#PRODUCT_INFO}
The field on the form would be named 'PRODUCT INFO' and the field value would be appended to the subject line.
The subject line setting seems static, but it would be helpful to make it dynamic by inserting a field value.
This helps with two things:
1) The emails will not stack up into a single thread so they don't get lost in GMail
2) The subject line is more descriptive and helpful
Here is the current contact form that I use:
https://matthewsohn.com/contact.php
The "Subject" drop-down is emailed in the body of the message but is not included in the subject of the email.
Any ideas and help would be greatly appreciated!
Matthew
Here I found a German post from 2020 about the desired function with a solution, see
>> https://helpcenter.websitex5.com/en/post/222199 (in German)
I haven't tested it myself, but perhaps Franz-Josef H. (Moderator) can also help here.
Maybe I'll do some tests and if it works, I'll write a little guide here.
My test with the contact form and ReCaptcha didn't work, the send button remained pale and no emails arrived.
Maybe the PHP experts will test it with the current version of WebSiteX5.
Author
The link to the post: >> https://helpcenter.websitex5.com/en/post/222199 (in German)
is very helpful.
Key point: use custom PHP code to replace fields with new values.
Thank you for identifying the PHP code file to modify: ../imemail/imEmailForm.php