nliautaud / p01contact

Create contact forms by writing simple tags. Also a plugin for GetSimple and Pico CMS.
MIT License
16 stars 15 forks source link

Error when there is no email field #55

Open notakoder opened 4 years ago

notakoder commented 4 years ago

As instructed in the readme file, I placed the p01-contact directory inside plugins folder and renamed it to PicoContact.

I have then created a form using the following parameters in my contact.md file,

Send us a direct message
---
(% contact : myemail@address.com %)

The form shows up in the web-browser with the default fields and I am able to enter text into them, but while I submit, I get the error saying Error : no message was sent.

nirwana101 commented 3 years ago

I just had the exact same problem.

Only when I added an field called Email the message was sent. Eventually I made the Email-field mandatory, like so: Email!

Because when I did not make it mandatory and did not fill in an email address then the error was still that the form could not be send.

From a contact-form point of view I can understand that one would like to have an email address. But IMHO this should not be required. And when this is required, then the form should not have options and samples that leave the Email field out.

notakoder commented 3 years ago

Hopefully, developers take a note of that. Thanks for the reply.

nliautaud commented 3 years ago

It seems like it shouldn't be the intended behaviour indeed, so I reopen the issue.

I cannot assure that I'll have time to look at the issue, but PRs are welcome.