Creating Email Template For Contact Form With Custom Layout

carsonsuite - 2 months ago

Hey! I'm using the contact form plugin to make a custom layout and I've added additional fields. (learned from docs) https://pyrocms.com/documentation/contact-plugin/latest

**With these additional fields, the email template would have to be modified to get this data to be posted over email to the desired address. What is the best way of overriding that generic email template to get a custom one to serve my custom layout.

Can this be done when setting the form, or am I looking at this the wrong way? Should I extend the entire Contact Plugin and overwrite everything?

Here is a look at my VERY custom layout: http://go.web901.io/fZXNfa

Answer

ryanthompson - 2 months ago

@carsonsuite you can set the message_view option like this:

.messageView('your.theme.here::emails/view')

https://pyrocms.com/documentation/contact-plugin/latest#introduction/configuration/options

ryanthompson - 2 months ago

@carsonsuite you can set the message_view option like this:

.messageView('your.theme.here::emails/view')

https://pyrocms.com/documentation/contact-plugin/latest#introduction/configuration/options

carsonsuite - 2 months ago

Answer was in front of me the whole time http://go.web901.io/PW2JFY Thanks @ryanthompson