eduardoboucas / staticman

💪 User-generated content for Git-powered websites
https://staticman.net
MIT License
2.39k stars 524 forks source link

How to use Staticman for contact forms? #429

Closed josineto closed 2 years ago

josineto commented 2 years ago

Hi! In some issues here and also on web, people mention the possibility of using Staticman for contact forms. But I can't figure out how (or whether) it could be done.

Is there a way to make a contact form using Staticman? What I mean is a form where a user can send me some message, along with name and email, so that I can reply that message via email.

I already have a running instance in Heroku, for my site's comments. It would be nice if contact form submissions were made to that same instance, which would keep it running for a few minutes more.

hispanic commented 2 years ago

Maybe I'm misunderstanding, but I think what you want is simply a comment submission form where the submission, itself, is never posted to or incorporated into your site. However, you'd have to configure the email field to not be hashed so you could see it.

josineto commented 2 years ago

Ah I understand. Sure, it's possible that way, but it keeps visitors' emails in my repository, which is not good. I'll search another solution then. Thank you @hispanic !

(Currently I'm using a Integromat scenario (like Zapier) to handle contact forms, which limits messages to ~300/month (spam included). I want to deploy a Netlify function for that, however)

hispanic commented 2 years ago

Good point. Yeah, that's tough. The email address is retained in the logic flow for a bit in order to subscribe people to notifications (via Mailgun), but then it gets hashed. Getting what you'd want would probably require some serious refactoring. If you figure something out, please share it back. Thanks.