PHPackages                             abwebdevelopers/oc-forms-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. abwebdevelopers/oc-forms-plugin

ActiveOctober-plugin[Payment Processing](/categories/payments)

abwebdevelopers/oc-forms-plugin
===============================

Custom form builder for OctoberCMS

1.5.1(4y ago)1038314[16 issues](https://github.com/ABWebDevelopers/oc-forms-plugin/issues)[1 PRs](https://github.com/ABWebDevelopers/oc-forms-plugin/pulls)MITPHPPHP &gt;=7.0CI failing

Since Jun 16Pushed 4y ago2 watchersCompare

[ Source](https://github.com/ABWebDevelopers/oc-forms-plugin)[ Packagist](https://packagist.org/packages/abwebdevelopers/oc-forms-plugin)[ RSS](/packages/abwebdevelopers-oc-forms-plugin/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (10)Dependencies (4)Versions (20)Used By (0)

Custom Forms
============

[](#custom-forms)

October Plugin for self created and styled forms, with a variety of customisations, emailing, storing submissions, etc

### Usage (October CMS)

[](#usage-october-cms)

Simple. Firstly you will need a form. Installing this plugin will automatically generate a basic contact form. This can be deleted or used as a reference - up to you.

##### Settings

[](#settings)

There are 3 main levels of settings: `Site Wide Settings` &gt; `Form Settings` &gt; `Field Settings`.

Form and Field settings that override Site Wide and Form settings (respectively) are accompanied by an "override" checkbox, which when checked allows the respective setting be override the 'more global' version of the setting.

Certain settings are only available at global level (Google recaptcha keys, queue emails, etc), while some are only available at field level.

##### Creating a form

[](#creating-a-form)

After configuring the global settings, head to the Custom Forms navigation item in the backend menu and click "Create".

Here you can enter the title of the form, and a code for it (which is used in layouts/the component for referencing the correct form).

**Please Note**Deferred binding on fields for forms is not configured just yet, meaning you will need to save the form before adding any fields. Feel free to open a PR for the fix to this.

After saving the form, you can now add fields by clicking the "Create fields" button

Fairly straight forward process, each field has a comment explaining the fields' purpose a little.

Validation can be configured - accepts a string of rules, `|` (pipe) delimited, as per normal Laravel / October [Validation Rules](https://octobercms.com/docs/services/validation#available-validation-rules). Only supports a single message per field at the moment.

##### Adding a form to a layout

[](#adding-a-form-to-a-layout)

As you would with component, open the layout and insert the respective component. This component comes with one required property:

- **Use Form (formCode):** This references a `Form` via the `code` field. Make sure it's set correctly.

##### Events

[](#events)

Currently there are about 24 events which may fire (depending on your configurations, of course). If you feel like there's an important event missing, please open an issue or PR.

```
// Runs at the beginning of "onRun" (when loading a page with a CustomForm)
Event::listen('abweb.forms.beforeRun', function (CustomForm $customForm) {
    // Do something...
    Log::debug('Loaded form: ' . $customForm->form->name);
});

// Runs at the end of "onRun" (when loading a page with a CustomForm)
Event::listen('abweb.forms.afterRun', function (CustomForm $customForm) {
    // Do something...
});

// Runs at the beginning of "onFormSubmit" (when submitting a CustomForm)
Event::listen('abweb.forms.beforeFormSubmit', function (CustomForm $customForm) {
    // Do something...
    Log::debug('User submitted form: ' . $customForm->form->name);
});

// Runs before validating the payload of a form. Can adjust data, rules, and messages
Event::listen('abweb.forms.beforeValidateForm', function (CustomForm $customForm, array &$data, array &$rules, array &$messages, Validator $validator) {
    // Do something...
});

// Runs if validating the payload of a form fails
Event::listen('abweb.forms.onValidateFormFail', function (CustomForm $customForm, array $data, array $rules, array $messages, Validator $validator) {
    // Do something...
});

// Runs if validating the payload of a form is successful
Event::listen('abweb.forms.afterValidateForm', function (CustomForm $customForm, array $data, array $rules, array $messages) {
    // Do something...
});

// Runs if validating the recaptcha response fails
Event::listen('abweb.forms.onRecaptchaFail', function (CustomForm $customForm, string $recaptchaResponse) {
    // Do something...
});

// Runs if validating the recaptcha response is successful
Event::listen('abweb.forms.onRecaptchaSuccess', function (CustomForm $customForm, array $data, array $rules, array $messages) {
    // Do something...
});

// Runs at the end of "onFormSubmit" (when submitting a CustomForm)
Event::listen('abweb.forms.afterFormSubmit', function (CustomForm $customForm, array $data, $response) {
    // Do something...
});

// Runs before rendering the form (or retrieving pre-rendered cache)
Event::listen('abweb.forms.beforeRenderPartial', function (CustomForm $customForm, bool $cachingEnabled) {
    // Do something...
    if ($cachingEnabled) {
        // Do something...
    }
});

// Runs after rendering the form (or retrieving pre-rendered cache). Can adjust HTML.
Event::listen('abweb.forms.afterRenderPartial', function (CustomForm $customForm, string &$html) {
    // Do something...
    $html .= '';
});

// Runs before sending notification emails. Can adjust data and recipient
Event::listen('abweb.forms.beforeSendNotification', function (CustomForm $customForm, array &$data, array &$to) {
    // Do something...
});

// Runs before validating notification recipients. Can adjust data, recipient and rules
Event::listen('abweb.forms.beforeNotificationValidation', function (CustomForm $customForm, array $data, array &$to, array &$rules, Validator &$validator) {
    // Do something...
});

// Runs if validating notification recipients fails
Event::listen('abweb.forms.onNotificationValidationFail', function (CustomForm $customForm, array $data, array $to, array $rules, Validator $validator) {
    // Do something...
    Log::info($validator->messages()->toArray());
});

// Runs if validating notification recipients is successful
Event::listen('abweb.forms.onNotificationValidationSuccess', function (CustomForm $customForm, array $data, array $to, array $rules) {
    // Do something...
});

// Runs when configuring the $message to send a notification to recipients
Event::listen('abweb.forms.onSendNotification', function (CustomForm $customForm, &$message, $to) {
    // Do something...
    $message->replyTo('noreply@domain.com');
});

// Runs after sending (or queueing) notification to recipients
Event::listen('abweb.forms.afterSendNotification', function (CustomForm $customForm, array $data, bool $success) {
    // Do something...
    if (!$success) {
        Log::debug('Dammit whats wrong now?');
    }
});

// Runs before sending auto reply email. Can adjust data, recipient name and email
Event::listen('abweb.forms.beforeSendAutoReply', function (CustomForm $customForm, array &$data, &$toEmail, &$toName) {
    // Do something...
    $toEmail = 'new@example.org';
    $toName = 'Mr. Nobody';
});

// Runs if validating auto reply recipient fails.
Event::listen('abweb.forms.onAutoReplyValidationFail', function (CustomForm $customForm, array $data, $toEmail, $toName, string $failedOn) {
    // Do something...
    if ($failedOn === 'email') {
        Log::debug('Invalid auto-reply email');
    } else { // 'name'
        Log::debug('Invalid auto-reply name');
    }
});

// Runs when configuring the $message to send an automatic reply to the user
Event::listen('abweb.forms.onSendAutoReply', function (CustomForm $customForm, &$message, $to) {
    // Do something...
    $message->bcc('mwahahaha@domain.com');
});

// Runs after sending (or queueing) auto reply email
Event::listen('abweb.forms.afterSendAutoReply', function (CustomForm $customForm, array $data, bool $success) {
    // Do something...
    if (!$success) {
        Log::debug($data);
    }
});

// Runs before saving the submission in the database. Can adjust the Submission's data
Event::listen('abweb.forms.beforeSaveSubmission', function (CustomForm $customForm, array &$submissionData) {
    // Do something...
    $submissionData['extraField'] = 'Add this to the database please';
});

// Runs after saving the submission in the database
Event::listen('abweb.forms.afterSaveSubmission', function (CustomForm $customForm, Submission $submission) {
    // Do something...
    if ($submission->url == '/') {
        $submission->delete();
    }
});

// Runs before setting email template vars. Can adjust the variables
Event::listen('abweb.forms.beforeSetTemplateVars', function (CustomForm $customForm, array &$vars) {
    // Do something...
    $vars['date'] = \Carbon\Carbon::now()->format('jS F Y');
});
```

### Bugs and feature requests

[](#bugs-and-feature-requests)

We encourage open source, so if you find any bugs, typos, issues or think of some great features, please open an issue or PR in the GitHub repo.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 53.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~46 days

Recently: every ~72 days

Total

18

Last Release

1746d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f8628eaab5c2f87b2ce79bcb55c7fe2d1377bdd4cf59f4ad2f12a74ec0be4ec8?d=identicon)[abwebdevelopers](/maintainers/abwebdevelopers)

---

Top Contributors

[![bradietilley](https://avatars.githubusercontent.com/u/44430471?v=4)](https://github.com/bradietilley "bradietilley (14 commits)")[![pvullioud](https://avatars.githubusercontent.com/u/3446410?v=4)](https://github.com/pvullioud "pvullioud (8 commits)")[![abweb-lewis](https://avatars.githubusercontent.com/u/71260246?v=4)](https://github.com/abweb-lewis "abweb-lewis (1 commits)")[![anitaeisenhaber](https://avatars.githubusercontent.com/u/52965221?v=4)](https://github.com/anitaeisenhaber "anitaeisenhaber (1 commits)")[![chrisvidal](https://avatars.githubusercontent.com/u/2263496?v=4)](https://github.com/chrisvidal "chrisvidal (1 commits)")[![owenvoke](https://avatars.githubusercontent.com/u/1899334?v=4)](https://github.com/owenvoke "owenvoke (1 commits)")

---

Tags

formshacktoberfestoctobercms-pluginplugincmssubscriptioncontactFormsnewslettercustomoctober

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/abwebdevelopers-oc-forms-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/abwebdevelopers-oc-forms-plugin/health.svg)](https://phpackages.com/packages/abwebdevelopers-oc-forms-plugin)
```

###  Alternatives

[unicodeveloper/laravel-paystack

A Laravel Package for Paystack

650975.6k11](/packages/unicodeveloper-laravel-paystack)[october/rain

October Rain Library

1601.7M63](/packages/october-rain)[payum/core

One million downloads of Payum already! Payum offers everything you need to work with payments. Friendly for all PHP frameworks (Symfony, Laravel, Laminas, Yii, Silex). Check more visiting site.

484.8M173](/packages/payum-core)[offline/oc-mall-plugin

E-commerce solution for October CMS

1744.6k2](/packages/offline-oc-mall-plugin)[janvince/smallcontactform

Simple but flexible multi language contact form builder with custom fields, validation and passive antispam

307.4k](/packages/janvince-smallcontactform)[payum/stripe

The Payum extension. It provides Stripe payment integration.

22573.1k3](/packages/payum-stripe)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
