# Content Prepare Form

<!-- meta: type=event-onContentPrepareForm; location=Joomla Events › Content Events; category=Trigger; platforms=Joomla -->

## Overview

When it runs: Whenever a component calls loadForm() — including admin list filter forms and item edit forms.

Plugins receive the JForm and can add fields, change fieldsets, or alter validation; fires for com_content.articles.filter (list) and com_content.article (edit), among others.

Each run also includes who was logged in at the time and what kind of item was involved — see audit_user and audit_type in Payload Fields below.

This trigger is active when Platform Events are turned on in Joomla (System → JOrchestrator) and matching flows are set to Active.

When this trigger fires, JOrchestrator starts the flow and passes the incoming event or request data to the next connected step. Configure filtering, payload shape, and security on the **Design** tab.

## Why use this node

Content Prepare Form is a **trigger** in the **Joomla Events › Content Events** group. Triggers start a flow. They listen for an external signal — a CMS event, inbound HTTP call, payment notification, or schedule — and pass the incoming data to the first downstream step.

Typical reasons teams add **Content Prepare Form** to a flow:

- Automate backend work when Joomla fires `ContentPrepareForm`
- Notify administrators or sync external systems on this CMS lifecycle event
- Enrich or validate CMS data before it is persisted
- Audit user, content, or extension activity without custom plugins

## When it runs

Whenever a component calls loadForm() — including admin list filter forms and item edit forms.

## Example workflows

Common patterns on the canvas:

1. **Content Prepare Form** → **Send Notification** (admin alert)
2. **Content Prepare Form** → **Insert Row** (audit log)
3. **Content Prepare Form** → **If** → **Send Email** / **Update Article**

## Good to know

Use General → Joomla context filter (e.g. com_content.article only) so list filter forms do not start the flow.

## Properties panel

The designer shows these tabs for this node:

| Tab | Purpose |
|-----|---------|
| **Info** | Plain-language description and output payload fields for downstream steps |
| **Design** | Trigger configuration and payload schema |

### System (automatic — not edited by the user)

These fields are managed by the designer or runtime — you do not type into them directly:

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `_nodeId` | Node ID | `node-id` | No | — | — |

### User-configured — General tab

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `label` | Label | `text` | No | — | Node label |
| `contentContextFilter` | Joomla context filter | `content-context-filter` | No | — | Form load hook — use com_content.article for edit forms only; com_content.articles.filter is the articles list filter bar. |

### CMS site configuration (not on this node's properties panel)

Credentials, API keys, mailers, SMTP, and integration defaults are configured in the CMS plugin under **Node Configuration**, not per step on this node. Link the flow to a domain before testing CMS-backed fields.

## Output payload fields

After this step runs, later nodes can reference these fields using placeholders such as
`{{content_prepare_form.context}}`.

| Field key | Type | Description |
|-----------|------|-------------|
| `context` | string | Joomla event context string. |
| `subject` | object | Email or notification subject line. |
| `data.id` | number | Nested field "data.id" from this node's output payload. |
| `data.title` | string | Nested field "data.title" from this node's output payload. |
| `data.alias` | string | Nested field "data.alias" from this node's output payload. |
| `data.introtext` | string | Nested field "data.introtext" from this node's output payload. |
| `data.fulltext` | string | Nested field "data.fulltext" from this node's output payload. |
| `data.catid` | number | Nested field "data.catid" from this node's output payload. |
| `data.state` | number | Nested field "data.state" from this node's output payload. |
| `data.created` | string | Nested field "data.created" from this node's output payload. |
| `data.created_by` | number | Nested field "data.created_by" from this node's output payload. |
| `data.created_user_id` | number | Nested field "data.created_user_id" from this node's output payload. |
| `data.modified` | string | Nested field "data.modified" from this node's output payload. |
| `data.modified_by` | number | Nested field "data.modified_by" from this node's output payload. |
| `data.modified_user_id` | number | Nested field "data.modified_user_id" from this node's output payload. |
| `data.created_time` | string | Nested field "data.created_time" from this node's output payload. |
| `data.modified_time` | string | Nested field "data.modified_time" from this node's output payload. |
| `data.access` | number | Nested field "data.access" from this node's output payload. |
| `data.language` | string | Nested field "data.language" from this node's output payload. |
| `data.featured` | number | Nested field "data.featured" from this node's output payload. |
| `audit_user.id` | number | Nested field "audit_user.id" from this node's output payload. |
| `audit_user.username` | string | Nested field "audit_user.username" from this node's output payload. |
| `audit_user.email` | string | Nested field "audit_user.email" from this node's output payload. |
| `audit_user.name` | string | Nested field "audit_user.name" from this node's output payload. |
| `audit_user.guest` | boolean | Nested field "audit_user.guest" from this node's output payload. |
| `audit_user.client` | string | Nested field "audit_user.client" from this node's output payload. |
| `audit_type` | string | What kind of item triggered the event — for example article, category, or user. |

## Related nodes

Other steps in the same area of the palette:

- **Content After Delete** (`event-onContentAfterDelete`) — Joomla Events › Content Events
- **Content After Display** (`event-onContentAfterDisplay`) — Joomla Events › Content Events
- **Content After Save** (`event-onContentAfterSave`) — Joomla Events › Content Events
- **Content After Title** (`event-onContentAfterTitle`) — Joomla Events › Content Events
- **Content Before Change State** (`event-onContentBeforeChangeState`) — Joomla Events › Content Events
