---
title: "Apps"
description: "J2Commerce's custom field system powers all checkout forms — billing address, shipping address, registration, guest checkout, and payment. The Custom Fields Plugin API opens this system to…"
url: "https://docs.j2commerce.com/developer/extensions/plugins/apps"
markdown_url: "https://docs.j2commerce.com/developer/extensions/plugins/apps.md"
last_updated: "2026-10-23T03:10:50+00:00"
version: "Developer"
breadcrumbs:
  - title: "Home"
    url: "https://docs.j2commerce.com/"
  - title: "Developer"
    url: "https://docs.j2commerce.com/developer"
  - title: "Extensions"
    url: "https://docs.j2commerce.com/developer/extensions"
  - title: "Plugins"
    url: "https://docs.j2commerce.com/developer/extensions/plugins"
  - title: "Apps"
    url: "https://docs.j2commerce.com/developer/extensions/plugins/apps"
---

# Apps

J2Commerce's custom field system powers all checkout forms — billing address, shipping address, registration, guest checkout, and payment. The Custom Fields Plugin API opens this system to third-party app plugins, letting them reuse the same fields, field types, and storage infrastructure in their own forms.

## What This API Enables

| Capability | Mechanism |
| --- | --- |
| Register new field types (`file_upload`, `color_picker`, etc.) | `onJ2CommerceGetCustomFieldTypes` event |
| Add a display area switcher to the custom field edit form | `onJ2CommerceGetCustomFieldDisplayAreas` event |
| Render plugin-defined field types as HTML | `onJ2CommerceRenderCustomField` event |
| Validate plugin-defined field types | `onJ2CommerceValidateCustomField` event |
| Inject extra fieldsets/tabs into the custom field edit form | `onJ2CommerceCustomFieldFormPrepare` event |
| Query fields assigned to a plugin area | `CustomFieldHelper::getFieldsByArea('your_area_key')` |
| Store plugin-specific metadata alongside field values | `CustomFieldHelper::setAddressParams()` / `getAddressParams()` |

## Architecture

```mermaid
graph TD
    A[App Plugin] -->|registers| B[Display Area\nonJ2CommerceGetCustomFieldDisplayAreas]
    A -->|registers| C[Field Type\nonJ2CommerceGetCustomFieldTypes]
    A -->|renders| D[Custom HTML\nonJ2CommerceRenderCustomField]
    A -->|validates| E[Field Input\nonJ2CommerceValidateCustomField]
    A -->|extends| F[Edit Form\nonJ2CommerceCustomFieldFormPrepare]

    B --> G[field_display JSON\non #__j2commerce_customfields]
    C --> H[Field type dropdown\nin admin CRUD]
    D --> I[CustomFieldHelper::renderField]
    E --> J[CustomFieldHelper::validateFields]

    A -->|reads fields| K[CustomFieldHelper::getFieldsByArea]
    A -->|saves data| L[#__j2commerce_addresses\ntype = plugin_key]
    A -->|stores metadata| M[params JSON column\nnamespaced by plugin]
```

*The Custom Fields Plugin API opens this system to third-party app plugins, letting them reuse the same fields, field types, and storage infrastructure in their*

## Design Principles

**No new tables for field data.** Plugin form submissions are stored as address records with a plugin-specific `type` value (e.g., `type = 'vendor_application'`). Custom field values populate the dynamic columns that the custom field system already creates. Non-field metadata (workflow status, tier assignments, etc.) goes into the `params` JSON column, namespaced by plugin element name.

**No schema changes for new areas.** Adding a plugin display area only requires a JSON key in the existing `field_display` column on `#__j2commerce_customfields`. No `ALTER TABLE`.

**Independent per-area ordering.** Each plugin area tracks its own `ordering` value inside the `field_display` JSON, completely independent of the core `ordering` column used by checkout areas.

## Database Columns Involved

| Table | Column | How Used |
| --- | --- | --- |
| `#__j2commerce_customfields` | `field_display` (TEXT) | JSON map of plugin area keys → `enabled` and `ordering` |
| `#__j2commerce_addresses` | `type` (varchar) | Plugin sets this to its area key (e.g., `vendor_application`) |
| `#__j2commerce_addresses` | `params` (TEXT) | JSON object namespaced by plugin element name |

## Pages in This Section

| Page | What It Covers |
| --- | --- |
| [Custom Field Types](https://docs.j2commerce.com/index.php?option=com_content&view=article&id=121&catid=73) | Register new field types; implement rendering and validation |
| [Display Areas](https://docs.j2commerce.com/index.php?option=com_content&view=article&id=122&catid=73) | Register plugin areas as switchers in the field edit form |
| [Form Extension](https://docs.j2commerce.com/index.php?option=com_content&view=article&id=125&catid=73) | Inject additional fieldsets into the custom field edit form |
| [Address Params](https://docs.j2commerce.com/index.php?option=com_content&view=article&id=119&catid=73) | Store plugin metadata alongside field data in address records |
| [Field Ordering](https://docs.j2commerce.com/index.php?option=com_content&view=article&id=124&catid=73) | Manage per-area field ordering independently of checkout |

## Event Dispatch Pattern

All five events use `J2CommerceHelper::plugin()->event()`:

```php
// File: administrator/components/com_j2commerce/src/Helper/J2CommerceHelper.php

// Dispatching (done by core — shown for reference)
J2CommerceHelper::plugin()->event('GetCustomFieldTypes', [&$types]);

// Handling (done by your plugin)
public function onGetCustomFieldTypes(Event $event): void
{
    $types = &$event->getArgument(0);
    $types['my_type'] = Text::_('PLG_J2COMMERCE_APP_MYPLUGIN_FIELDTYPE_MY_TYPE');
}
```

Events that pass mutable data use a by-reference argument at index `0`. Events that pass named read-only arguments (form, field object) use named keys accessed via `$event->getArgument('name')`.

## Related

- [Apps View Hook](https://docs.j2commerce.com/index.php?option=com_content&view=article&id=118&catid=63) — Register your plugin in the J2Commerce Apps view
- App Plugin: Gift Wrapping — Example app plugin pattern

## Pages

- [Checkout Shield: Extending the Dashboard](https://docs.j2commerce.com/developer/extensions/plugins/apps/checkoutshield.md): Architecture, database schema, configuration reference, task routines, and the three dashboard-extensibility events for plg_j2commerce_app_checkoutshield.
- [Email Type Provider Interface](https://docs.j2commerce.com/developer/extensions/plugins/apps/email-type-provider.md): How to implement EmailTypeProviderInterface in an app plugin to register custom email types, ship bundled HTML templates, and supply shortcode values at send time.
- [Extending the Custom Field Edit Form](https://docs.j2commerce.com/developer/extensions/plugins/apps/form-extension.md): How to inject additional fieldsets and tabs into the J2Commerce custom field edit form using the onJ2CommerceCustomFieldFormPrepare event.
- [Plugin Field Ordering](https://docs.j2commerce.com/developer/extensions/plugins/apps/field-ordering.md): How J2Commerce app plugins manage independent field ordering per plugin area using the field_display JSON column and a drag-to-reorder admin interface.
- [Registering Custom Field Types](https://docs.j2commerce.com/developer/extensions/plugins/apps/custom-field-types.md): How to register new custom field types in J2Commerce using the onJ2CommerceGetCustomFieldTypes, onJ2CommerceRenderCustomField, and onJ2CommerceValidateCustomField events.
- [Registering Display Areas](https://docs.j2commerce.com/developer/extensions/plugins/apps/display-areas.md): How to register a plugin display area in J2Commerce so store owners can assign existing checkout fields to your plugin's form using the onJ2CommerceGetCustomFieldDisplayAreas event.
- [Storing Plugin Data in Address Records](https://docs.j2commerce.com/developer/extensions/plugins/apps/address-params.md): How J2Commerce app plugins store form submissions as address records and use the namespaced params JSON column to persist plugin-specific metadata alongside custom field values.
