Get support for ericlbarnes/Statamic-email-form
If you're new to LTH, please see our FAQ for more information on what it is we do.
Support Options
Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:
View Open IssuesTake a look to see if anyone else has experienced the same issue as you and if they managed to solve it.
Open an IssueMake sure to read any relevant guidelines for opening issues on this repo before posting a new issue.
Sponsor directlyCheck out the page and see if there are any options to sponsor this project or it's developers directly.
ericlbarnes/Statamic-email-form
Statamic Email Form Plugin
This plugin is designed to allow you to quickly and easily create forms that will be used to email reciepents. This is a very simple plugin and if you need more power checkout the official Raven plugin.
Example Form Template
Here is a full example to get you going. Please see the parameters section for more field options:
{{ email_form subject="Contact Form" to="handsome@example.com" required="name" }}
{{ if error}}
<h1>Error</h1>
<ul>
{{ errors }}
<li>{{error}}</li>
{{ /errors }}
</ul>
{{ endif }}
{{ if success }}
<p>Your message has been sent!</p>
{{ else }}
<div>
<label for="name">Name:</label>
<input type="text" name="name" id="name" value="Bill">
</div>
<div>
<label for="from">Email:</label>
<input type="text" name="from" id="from" value="test@test.com">
</div>
<div><input type="submit"></div>
{{ endif }}
{{ /email_form }}
Parameters
The {{ email_form }}
tag accepts the following paramaters:
- msg_header: The top body section of the email.
- msg_footer: The bottom body section of the email.
- subject: The subject of the email.
- to: The form recipient's email address.
-
from: A email address to be used by the form. The
Reply-to
is always the supplied fromfrom
field. - cc: A cc email address.
- bcc: A bcc email address.
- required: A pipe separated list of required fields. Example: "name|address|city". Currently this only does simple validation to check if it is an empty value.
- class: Apply a class to the form
- id: Apply an ID to the form
Issues / Gotchas - On the radar
- With html_caching enabled the success and error messages will not display. See this issue report
- The name field is hard coded as the reply name in the plugin so it is recommended you use this field in your form.
- The plugin does have some hard coded English text and that will be fixed up in a future release. Still deciding on the best option for this.
- Validation is currently lacking some useful features. Basically only simple checking if the field is empty.
Contributions
If you see any issues or have ideas for improvements pull requests are gladly accepted. ;-)
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2