homm / hommform
Submit and view forms
Requires
- php: ^8.2
- ext-fileinfo: *
- ext-json: *
- craftcms/cms: ^5.0.0
README
HOMM Form for contact form requests
Requirements
This plugin requires Craft CMS 5.x and PHP 8.2+.
For the Craft CMS 4.x plugin version, see 2.x tags. For the Craft CMS 3.x plugin version, see 1.x tags.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project -
Then tell Composer to load the plugin:
composer require homm/hommform -
In the Control Panel, go to Settings → Plugins and click the “Install” button for HOMM Form.
HOMM Form Overview
With this plugin you can send forms per email and view them through the control panel. Specially this plugin does not send attachments through email, but saves it at a specified location and sends instead a link to the user.
Using HOMM Form
Example form submission:
<form action="{{ url('hommform/submit') }}" method="post" enctype="multipart/form-data"> {{ csrfInput() }} {# pass `async: true` if you use static site caching #} {{ hiddenInput('formId', entry.formId) }} {{ hiddenInput('receivers', entry.receivers|hash) }} {{ hiddenInput('subject', entry.subject|hash) }} {# Optional: if recaptcha secret is provided #} {{ craft.hommform.recaptcha | raw }} {# Optional: set a redirection URL #} {{ redirectInput('redirect/to/page') }} <label for="name">Name</label> <input type="text" name="name" id="name"> <label for="email">Email</label> <input type="email" name="email" id="email"> {# Optional: a field name which contains the reply address #} {{ hiddenInput('replyto', 'email'|hash) }} {# Optional: a confirmation text which will be sent to the email address provided by "replyto" #} <textarea name="confirmation" style="display: none;">{{ entry.confirmation }}</textarea> </form>
After submitting a form, you can view, search and export them in the control panel.
Form submission error codes:
C955-JTS0: Failed to verify reCAPTCHA responseWFQT-OMCT: Failed to send email notificationPYZF-XFZK: File type not allowed1RUU-EUNT: Failed to upload fileAL1R-ZCW3: Failed to create upload folder1DGS-46UW: Failed to insert form data
HOMM Form Roadmap
Some things to do, and ideas for potential features:
- Set flash messages if the form was submitted through a normal form request instead of
Content-Type: application/json - You'll let us know...
Brought to you by HOMM interactive