PHPackages                             sbodak/magento2-checkout-custom-form - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sbodak/magento2-checkout-custom-form

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

sbodak/magento2-checkout-custom-form
====================================

Add a custom form to Magento 2 checkout on the shipping step.

2.0.0(3w ago)1013.5k64[9 issues](https://github.com/sbodak/magento2-checkout-custom-form/issues)[1 PRs](https://github.com/sbodak/magento2-checkout-custom-form/pulls)MITPHPPHP ^8.1|^8.2|^8.3|^8.4

Since Nov 11Pushed 3y ago10 watchersCompare

[ Source](https://github.com/sbodak/magento2-checkout-custom-form)[ Packagist](https://packagist.org/packages/sbodak/magento2-checkout-custom-form)[ RSS](/packages/sbodak-magento2-checkout-custom-form/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (7)Versions (14)Used By (0)

Magento 2 - Checkout custom form
================================

[](#magento-2---checkout-custom-form)

Overview
--------

[](#overview)

Add a custom form fields to the Magento 2 checkout. The form will appear in the first checkout step (shipping step) above shipping methods. The form is available for logged in customers and guests. After an order is placed all data are set in `sales_order` table. Data are still in the form after page refreshed, till cart is active.

Form data will be set in a `quota` table through independent API request:

- `/V1/carts/mine/set-order-custom-fields` (for logged in customer)
- `/V1/guest-carts/:cartId/set-order-custom-field` (for guest)

Compatibility
-------------

[](#compatibility)

- Tag 1.2.\* =&gt; Magento 2.3
- Tag 1.1.\* =&gt; Magento 2.1.x - 2.2.x (no longer supported)

Requirements
------------

[](#requirements)

- PHP 7.0 or higher

Installation details
--------------------

[](#installation-details)

1. Run `composer require sbodak/magento2-checkout-custom-form`
2. Run `php bin/magento module:enable Bodak_CheckoutCustomForm`
3. Run `php bin/magento setup:upgrade`

### Sample custom form fields

[](#sample-custom-form-fields)

- buyer
- buyer email address
- purchase order no.
- goods mark
- comments

### Modify form fields

[](#modify-form-fields)

- You need to modify service contract data interface in `Api/Data/CustomFieldsInterfaces.php`
- You need to modify table schema in `Setup/InstallData.php`
- You need to add new fields to observer `Observer/AddCustomFieldsToOrder.php` which save data in quota and sales table
- You need to add new item in `view/frontend/layout/checkout_index_index.xml`
- You need to modify the methods in `Model/Data/CustomFields.php`
- You need to modify the methods in `Model/CustomFieldsRepository.php`

```

    uiComponent
    custom-checkout-form-fields

        [... place here new definition of your field]

```

Check official documentation: [https://devdocs.magento.com/guides/v2.3/howdoi/checkout/checkout\_form.html](https://devdocs.magento.com/guides/v2.3/howdoi/checkout/checkout_form.html)

- You need to modify template views in `view/frontend/templates/order/view/custom_fields.phtml` (for customer account) and `view/adminhtml/templates/order/view/custom_fields.phtml (for admin panel)`.
- Checkout form view is generated automatically using Ui Components

### Required entry

[](#required-entry)

If you want to make field required, check this example:

```

    Magento_Ui/js/form/element/abstract

        customCheckoutForm
        ui/form/field
        ui/form/element/input

        true

    checkoutProvider
    customCheckoutForm.checkout_purchase_order_no
    Purchase order no.
    3

```

### Fast fields override

[](#fast-fields-override)

You can modify `i18n/en_US.csv` translation to change field names.

### Checkout view - custom form - Guest

[](#checkout-view---custom-form---guest)

[![Checkout frontend custom form - Guest](docs/frontened_checkout_custom_form_guest.png)](docs/frontened_checkout_custom_form_guest.png)

### Checkout view - custom form - Logged in

[](#checkout-view---custom-form---logged-in)

[![Checkout frontend custom form - Logged in](docs/frontened_checkout_custom_form_logged.png)](docs/frontened_checkout_custom_form_logged.png)

### Custom account - Order history view

[](#custom-account---order-history-view)

[![Customer account - Order history view](docs/frontend_customer_account_orders.png)](docs/frontend_customer_account_orders.png)

### Admin panel - Order Edit

[](#admin-panel---order-edit)

[![Admin panel - order edit](docs/backend_order_custom_information.png)](docs/backend_order_custom_information.png)

Uninstall
---------

[](#uninstall)

To remove this module run `php bin/magento module:uninstall Bodak_CheckoutCustomForm`. It will remove all data and drop columns in `sales_order` and `quote` tables.

License
-------

[](#license)

[MIT License](LICENSE)

###  Health Score

53

↑

FairBetter than 97% of packages

Maintenance51

Moderate activity, may be stable

Popularity37

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 80% 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 ~280 days

Recently: every ~692 days

Total

12

Last Release

24d ago

Major Versions

1.2.1 → 2.0.02026-04-18

PHP version history (3 changes)1.0.0PHP ~7.0.0

1.1.3PHP ~7.0.0|~7.1.3|~7.2.0

2.0.0PHP ^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/518113abdd47a519a9fad1df5a6317b250e8b34448342436f70bf7b51624df40?d=identicon)[sbodak](/maintainers/sbodak)

---

Top Contributors

[![sbodak](https://avatars.githubusercontent.com/u/25949343?v=4)](https://github.com/sbodak "sbodak (16 commits)")[![WebWeave](https://avatars.githubusercontent.com/u/17380630?v=4)](https://github.com/WebWeave "WebWeave (4 commits)")

---

Tags

magento-2magento2magento2-checkoutmagento2-extensionmagento2-modulemagento2magento2 modulecustom checkoutcheckout form

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sbodak-magento2-checkout-custom-form/health.svg)

```
[![Health](https://phpackages.com/badges/sbodak-magento2-checkout-custom-form/health.svg)](https://phpackages.com/packages/sbodak-magento2-checkout-custom-form)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

69344.4k](/packages/run-as-root-magento2-prometheus-exporter)[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50374.2k18](/packages/dotdigital-dotdigital-magento2-extension)[opengento/module-gdpr

Gdpr Compliance Module for Magento 2

14481.5k](/packages/opengento-module-gdpr)[smile/module-store-delivery

Smile Store Delivery

23348.7k1](/packages/smile-module-store-delivery)[medialounge/magento2-storyblok-integration

Magento 2 extension to integrate Storyblok visual editor

2965.1k](/packages/medialounge-magento2-storyblok-integration)

PHPackages © 2026

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