0

I am using EE's contact form {exp:email:contact_form} for user submitted queries on my site and would like to know if its possible to customize the layout of the email it sends?

Currently I have several fields that need to be sent (first name, last name, mobile, email & message) and I have added them to the message content by naming all the inputs with the

name="message[]"

attribute which adds each field on its own line. Am I able to add in for e.g a header piece of copy ("The following is a query from your website") or labels for the fields ("Firstname: {first_name_input}" ?

1 Answer 1

0

Sure can, the secret is in using hidden fields:

To add a generic message you could do:

<input type="hidden" name="message[]" value="The following is a query from your website">

Or to add a heading for a field do:

<label for="cheese">What's the best cheese?</label>
<input type="hidden" name="message[]" value="--favourite cheese--">
<input type="text" id="cheese" name="message[]" value="">

That will output something like:

The following is a query from your website

--favourite cheese--

Gorgonzola

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.