This project is not covered by Drupal’s security advisory policy.

A form builder module for Drupal, fork of core contact module.

No release, yet. Validation and accessibility must be fixed first. But I'm open for any feedback.

Why?

In short: I don't like the core contact or webform modules. Improving the contact module was not possible because of heavy, breaking changes. Improving the webform module was not possible because of privacy issues and therefore trust issues. So I decided to go the hard route.

Related, long forum post: State of form builder modules - or: How to build (contact) forms without webform?

See also docs/decisions folder in the formable source repository.

Features/TODO

  • removed from core contact
    • [x] disabled hard coded /contact, /contact/{form} and /{lang}/contact/{form} routes
    • [x] disabled hard coded footer menu item
    • [x] disabled personal user forms
    • [x] disabled auto-reply (to prevent spam abuse)
    • [x] disabled "Send yourself a copy"
    • [ ] disabled redirect to front page
    • [x] dropped base field definitions (name, mail, subject, message)
  • [x] added option to expose forms under custom route
  • implemented from contact_block
    • [x] added block usage
  • implemented from contact_storage module
    • [x] store messages by default
    • user interface to list/view/delete stored messages
      • [x] list
      • [ ] view single message (with more details, eventually with field formatters)
      • [x] delete
      • [ ] multiple delete
    • [ ] custom text for submit button
    • [ ] clone form
    • [ ] disable form (currently disabled if invalid)
  • [x] option to disable storing messages
  • implemented from contact_storage_dm
    • [x] disable sending mails (by leaving recipients field empty)
  • implement a11y_form_helpers
    • [ ] aria-describedby for error messages
    • [ ] ...
  • [ ] implement validation
  • [x] implement honeypot
  • [x] implement simple captcha
  • missing changes from core after hard fork
  • [ ] implement REST for messages

TODO: collect more features from existing modules

Installation

install drupal and drush:

mkdir -p my-project && cd my-project
composer create-project drupal/recommended-project .
composer require drush/drush
# call `./vendor/bin/drush` instead of `drush` or
# add drush to $PATH - see https://www.drush.org/12.x/install/
drush site:install

install and enable module:

composer require drupal/formable
drush pm:install formable

grant permissions to view forms as anonymous user:

drush role:perm:add anonymous 'access site-wide formable form,access block-view formable form'

Uninstallation

# The module can't be uninstalled without removing associated entities from
# the database beforehand
drush entity:delete formable_message
# uninstall module
drush pm:uninstall formable
# delete module
composer remove drupal/formable

Development

see docs/development.md

Project information

Releases