contact-form
contact-form copied to clipboard
404 Error
Description
Contact form for Craft CMS site (up to date) is giving 404 error when submitted. Original developer has no clear solution upon review.
Steps to reproduce
- go to https://tedwardwines.com/contact
- fill out form and click send message
Additional info
- Craft version: Craft Pro 3.6.6
- PHP version: 7.4.7 --
- Database driver & version: MySQL 8.0.20
- Plugins & versions: Contact Form 2.2.7
@dveraldi : The redirect path doesn't seem to work. Do you get the notification when the form is submitted (/does the actual form work)? And have you tried turning on dev-mode and see whether you get an error?
@dveraldi: While I was using the hidden input as contactForm/sendMessage
, I also experienced 404 errors.
<input type="hidden" name="action" value="contactForm/sendMessage">
Changing it to contact-form/send
solved the issue for me. It might also work for you.
<input type="hidden" name="action" value="contact-form/send">
@MvBeurden @itsdwizzy
The docs detail {{ actionInput('contact-form/send') }}
so I'm guessing it would be similar syntax using a hidden field (as @itsdwizzy has pointed out)
If you’re using the plugin’s built-in controller action, the value should be: contact-form/send
. contactForm/sendMessage
is what you would use with a Craft 2 version of this plugin.
If you have your own plugin to handle the send, please remember to use the kebab-case
.
I hope this helps!