Contact Form
Version 3.0.0
May 2, 2022
Added
- Added Craft 4 compatibility.
- Added the
allowedMessageFields
setting, which can be used to restrict whichmessage
fields are allowed to be submitted.
Changed
- Failed submissions are now passed back to the template as a
submission
variable, instead ofmessage
. - The
contact-form/send
action now returns a 400 status on failure for Ajax requests.
Version 2.5.2
March 16, 2023
- Added translations for
Email
andName
. (#235)
Version 2.5.1
May 2, 2022
Fixed
- Fixed a bug where newlines were getting replaced with double newlines in message bodies. (#214)
Version 2.5.0
April 15, 2022
Added
- Added the
allowedMessageFields
setting, which can be used to restrict whichmessage
fields are allowed to be submitted.
Version 2.4.1
April 12, 2022
Fixed
- Fixed a potential PHP error.
Version 2.4.0
April 11, 2022
Changed
- Custom message fields’ labels can now be translated using the
site
translation category. (#161)
Version 2.3.0
January 21, 2022
Changed
- Craft 3.4 or later is now required.
- The success flash message is now returned in the response for AJAX calls.
craft\contactform\models\Submission
now supportsEVENT_DEFINE_RULES
. (#196)
Version 2.2.7
May 4, 2020
Changed
- Added case-insensitive extension check for attachments.
Version 2.2.6
December 17, 2019
Changed
- The Contact Form “To Email” setting can now be set to environment variables (e.g.
$CONTACT_TO_EMAIL
). (#179) - Contact Form now requires Craft 3.1 or later.
Version 2.2.5
May 31, 2019
Changed
- Contact Form now respects Craft’s allowedFileExtensions config setting.
- Contact Form now logs a
warning
instead ofinfo
to the log files when an email is flagged as spam. (#163)
Version 2.2.4
April 3, 2019
Fixed
- Fixed an issue with Japanese Characters. (#158)
Version 2.2.2
July 19, 2018
Fixed
- Fixed a PHP error introduced in 2.2.1 that broke submissions that were using a single
message
form input.
Version 2.2.1
July 18, 2018
Fixed
- Fixed a bug where blank messages wouldn’t fail validation if the message was split into multiple fields.
Version 2.2.0
July 18, 2018
Added
- Contact Form is now translated into Arabic. (#125)
Changed
- Contact emails no longer list the Name field if none was provided. (#126)
- Event listeners for
craft\contactform\Mailer::EVENT_BEFORE_SEND
can now make changes tocraft\contactform\events\SendEvent::$toEmails
, and they will be respected. (#112)
Fixed
Version 2.1.1
December 4, 2017
Changed
- Loosened the Craft CMS version requirement to allow any 3.x version.
Version 2.1.0
October 12, 2017
Added
- Added German translations.
Changed
- Email message bodies now include the sender’s name and email. (#97)
Version 2.0.3
September 15, 2017
Added
- Craft 3 Beta 27 compatibility.
Version 2.0.2
July 7, 2017
Added
- Craft 3 Beta 20 compatibility.
Version 2.0.1
June 12, 2017
Fixed
- Fixed a bug where the
message
variable was not available to contact form templates when the submission contained validation errors.
Version 2.0.0
May 16, 2017
Added
- Added Craft 3 compatibility.
- Added the
afterSend
event.
Changed
- The
beforeSend
event now has$submission
and$message
properties, set to the user submission model and the compiled email message, respectively. - The
contactForm/sendMessage
action is nowcontact-form/send
.
Removed
- Removed honeypot field support. (Moved to the contact-form-honeypot plugin.)
- Removed the
beforeMessageCompile
event. - Removed the
$isValid
property from thebeforeSend
event. Use thebeforeValidate
event on theSubmission
model to prevent submissions from going through.
Version 1.8.1
September 2, 2016
Fixed
- Fixed a bug where the HTML body of an email was being escaped displaying HTML entities in the email.
Version 1.8.0
August 18, 2016
Added
- Added the ability for plugins to modify the email's plain text and HTML body via the
contactForm.beforeMessageCompile
event.
Fixed
- Fixed a bug where Twig code that was entered in the email body or subject was getting parsed.
Version 1.7.0
January 18, 2016
Added
- Added the ability to access individual message fields values via
message.messageFields
when a validation error occurred. For example, the value of the inputmessage[Phone]
can now be accessed viamessage.messageFields['Phone']
.
Changed
- Custom message field values only have a single line break between them in the generated email body now, rather than two.
Version 1.6.0
December 20, 2015
Added
- Added the ability to attach multiple files to the contact email.
- Added the ability to change the flash success message via the "successFlashMessage" setting.
- Added the ability to override plugin settings via a
craft/config/contactform.php
config setting.
Changed
- The "prependSender" and "prependSubject" settings can now be empty strings.
Fixed
- Fixed a bug where the "allowAttachments" config setting wasn't being respected.
Version 1.5.0
December 20, 2015
Added
- Added support for some Craft 2.5 features.
Version 1.4.0
June 1, 2014
Added
- Added support for passing
{fromName}
,{fromEmail}
, and{subject}
in the ‘redirect’ URL.
Version 1.3.0
January 7, 2014
Added
- Added support for multiple email addresses
- Added the ContactFormService
- Added the
contactForm.beforeSend
event, allowing third party plugins to add extra validation
Version 1.2.0
December 30, 2013
Added
- Added honeypot captcha support
Version 1.1.0
December 4, 2013
Added
- Added the ability to submit attachments
- Added the ability to submit the form over Ajax
- Added the ability to submit checkbox lists, which get compiled into comma-separated lists in the email
Version 1.0.0
October 3, 2013
- Initial release