Made a simple module to add a contact form in Tome static sites

Created on 25 October 2023, 11 months ago
Updated 4 December 2023, 10 months ago

Problem/Motivation

Static sites miss a contact form. It's probably my most missed option in Tome. Until now.

Proposed resolution

When we are about to decommission a site, or make a static one because it's not expected to update often, a simple contact form is enough.

I made https://www.drupal.org/sandbox/bserem/3396737 β†’ (will be promoted to a full project soon). It creates a form, fully compatible with CAPTCHA, that gets exported as static html and sends submissions to a php file.
The developer must edit and upload the php file next to the static html files.
From there on, a submission will be sent to an email.

The need for this module came mostly to make the contact form protected via CAPTCHA inside Drupal!
The module, even though simple, solves a big issue of mine. It's also a useful starting place for people to fork/hack and make more complex forms for their static sites if needed.

Remaining tasks

I'd love to get some feedback on this. If you like it, consider mentioning the module in Tome's project page.
I plan to make a full release in the next couple of days.

Thanks

✨ Feature request
Status

Closed: won't fix

Version

1.0

Component

Tome Static

Created by

πŸ‡¬πŸ‡·Greece bserem

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @bserem
  • Status changed to Closed: won't fix 11 months ago
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Thanks for sharing.
    This feels out of scope for the module.

    It also sounds like it could be an open email relay, there are a lot of things that contact module does (like flood control) that shouldn't be underestimated here.

  • πŸ‡¬πŸ‡·Greece bserem

    Obviously it's not related to Time, but like I said, I'd to get some feedback if anyone has a thing to say or two.

    I'll try to add some flood control checks in the near future. As far as I know the contact module is completely incompatible with Time, that's why I started my attempts on a contact form. If I missed something here please let me know.

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    I think your best bet here would be a third-party service like netlify forms https://www.netlify.com/platform/core/forms/

  • πŸ‡¦πŸ‡ΊAustralia elgandoz Canberra

    @bserem I use https://www.drupal.org/project/tome_netlify β†’ for this, which relies on core "Contact" module. Obviously it works only on Netlify, but it doesn't require a php server with a mail system configured, which is defeats the purpose of static file generation IMHO.
    Alternatively you could use a 3rd party service like https://formspree.io/.

Production build 0.71.5 2024