craftcms/contact-form

Error(s) in ajax example

Closed this issue · 2 comments

Just want to note an error in the ajax example:
in the line // e.g. response.error.fromName => ['From Name is required']
the variable is actually response.errors.fromName

Also, shouldn't the post url be url: '/contact-form/send', instead of just url: '/',?

I found the errors variable too.

With the URL, you can still use <input type="hidden" name="action" value="contact-form/send"> in the form and it'll submit OK - at least it does for me

Thanks! Fixed in 27eb923