> For the complete documentation index, see [llms.txt](https://docs.acpt.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acpt.io/developers/shortcodes/acpt_form.md).

# \[acpt\_form]

Render an ACPT form

{% hint style="warning" %}
This shortcode requires an active ACPT license.
{% endhint %}

Renders a form created in the [Forms manager](/forms/manage-forms.md). The form ID is required.

### Usage

```
[acpt_form id="e45b2639"]
```

You can also pre-populate the form with an existing record by passing a context ID:

```
[acpt_form id="e45b2639" pid="123"]
[acpt_form id="e45b2639" tid="123"]
[acpt_form id="e45b2639" uid="123"]
```

The special value `{current_post}` can be used for `pid` to automatically use the current post:

```
[acpt_form id="e45b2639" pid="{current_post}"]
```

For forms whose action is **Fill Table (CCT)**, pass `record_id` to pre-load an existing CCT record for editing:

```
[acpt_form id="e45b2639" record_id="49"]
```

### Parameters

| Parameter   | Required | Description                                                                                                                                                            |
| ----------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`        | Required | The form ID (shown in the Forms list)                                                                                                                                  |
| `pid`       | Optional | Pre-populate with a post's data. Accepts a post ID or `{current_post}`.                                                                                                |
| `tid`       | Optional | Pre-populate with a term's data. Accepts a term ID.                                                                                                                    |
| `uid`       | Optional | Pre-populate with a user's data. Accepts a user ID.                                                                                                                    |
| `record_id` | Optional | Pre-populate with an existing CCT table record for editing. Accepts an integer record ID or a UUID string. Only applies to forms with the **Fill Table (CCT)** action. |

{% hint style="danger" %}
If the provided ID does not match an existing record, the form will not be displayed.
{% endhint %}

### Examples

Editing the current post in a front-end form:

```php
$postId = get_the_ID();
echo do_shortcode('[acpt_form id="e45b2639" pid="' . $postId . '"]');
```

Editing an existing CCT table record:

```php
$recordId = 49;
echo do_shortcode('[acpt_form id="e45b2639" record_id="' . $recordId . '"]');
```
