The Email Address field allows you to require a valid email address using Craft and Sprout Forms front-end Fields.
When an email address is recognized, a Send Email icon appears at the right hand side of an Email Address field. If you click on the Send Email link, your computer will open your primary mail program and populate the
to: field with your email address.
The Email Address field works with Sprout Forms and will be output dynamically along with all supported front-end fields.
Email Address supports HTML5 client-side validation including the
required attribute, the
The Email Address field is valid when your input has no spaces, an at sign
@, and a period
. followed by any number of characters.
Note: The default email validation is not meant to catch every email that is invalid, only reduce the chances that invalid emails are caused by small typos.
Custom Validation and Error Messages
If you have more specific email validation needs, you can select the Email Addresses for this field have their own validation pattern setting and provide a custom Validation Pattern and Error Message. Custom Validation Patterns support regular expressions and will be added as the pattern="" attribute on the front-end email
Require email address to be unique
Enable the Require email address to be unique option if you want to ensure that an email address can only be used once. Duplicate emails using the same field will be considered invalid. Unique emails are only considered on a per-field basis. If you create multiple Email Address fields with the Require email address to be unique option, similar emails can be used across the different fields, but not for data using the same email field.
One use case where this might be handy is if you are running a contest and have a landing page form where you only want each person (identified by email address) to be able to submit one entry.
We have over 20,000 hours of Craft experience and work in close collaboration with businesses, agencies, and individuals to help make Craft CMS the best platform for you and your business. Save time and build a website that respects best practices and is designed to be scalable, maintainable, and grow with your online business and marketing needs.Let's talk
On top of our experience with the Sprout Plugin Suite, we’ve designed and built numerous custom plugins to help organizations address unique business and marketing challenges. From custom workflows to e-commerce to deep API integrations with customer databases, analytics, and cloud services, we can help build custom plugins suited to your specific needs.Let's talk
Maintaining your website, content strategy, and customer relationships have a large impact on your business. Whether you’re a business owner, marketing director, or content author, we can help keep things running smoothly. We offer on-call and monthly retainer services to help you answer burning questions, fix annoying bugs, update software, monitor analytics, and even come running if there’s a fire.Let's talk
Curious how your Craft website stacks up against all the other Craft sites out there? As a digital agency and CMS specialists who have worked with Craft since day one, our team can provide you insight into everything from content architecture to code debt. Request an audit to learn about optimization opportunities and provide a path for your business to create a better user experience and a more targeted digital strategy.Request an Audit