WebSite X5Help Center

 
Matthew S.
Matthew S.
User

Adding data to subject line in Contact Form  en

Author: Matthew S.
Visited 116, Followers 2, Shared 0  

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

Posted on the
3 ANSWERS - 1 USEFUL
Daniel W.
Daniel W.
User
Best User of the month DEBest User of the month EN

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.

Read more
Posted on the from Daniel W.
Daniel W.
Daniel W.
User
Best User of the month DEBest User of the month EN

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.

Read more
Posted on the from Daniel W.
Matthew S.
Matthew S.
User
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

Read more
Posted on the from Matthew S.