For the complete documentation index, see llms.txt. This page is also available as Markdown.

Forms

acpt/list-forms, acpt/get-form, acpt/save-form, acpt/delete-form, acpt/get-form-field, acpt/save-form-field, acpt/delete-form-field

Category: acpt-content-model · Default capability: manage_options

Ability
What it does

acpt/list-forms

Returns every ACPT form

acpt/get-form

Returns a single form by name, including its fields

acpt/save-form

Creates a form, or updates it if the name already exists

acpt/delete-form

Deletes a form and its fields

acpt/get-form-field

Returns a single field of a form

acpt/save-form-field

Creates a field on a form, or updates it if the name already exists on that form

acpt/delete-form-field

Deletes a field from a form

There's no acpt/list-form-fields ability — acpt/get-form already returns the form's full fields array, so a dedicated listing ability would just duplicate it.

acpt/list-forms

No input required.

$result = wp_get_ability('acpt/list-forms')->execute();

acpt/get-form

Input

Property
Type
Required

name

string

Yes

$result = wp_get_ability('acpt/get-form')->execute([
    'name' => 'contact-us',
]);

acpt/save-form

Input

Property
Type
Required
Notes

name

string

Yes

If a form with this name already exists, it's updated instead of duplicated

key

string

Yes

Unique form key, used in the [acpt_form] shortcode and the public form-submission REST endpoint

action

string

Yes

NONE, EMAIL, PHP, AJAX, CUSTOM, or FILL_META — what happens when the form is submitted

label

string

No

fields

array

No

Field definitions — see acpt/save-form-field for the shape of each item

meta

array

No

Form-level metadata (email settings, submission limits, etc. — see Manage forms)

acpt/delete-form

Input

Property
Type
Required

name

string

Yes

acpt/get-form-field

Input

Property
Type
Required

formName

string

Yes

fieldName

string

Yes

acpt/save-form-field

Input

Property
Type
Required
Notes

formName

string

Yes

The form this field belongs to

group

string

Yes

The canvas group/section this field is placed in

name

string

Yes

If a field with this name already exists on that form, it's updated instead of duplicated

key

string

Yes

type

string

Yes

e.g. Text, Email, Textarea, Select, File, Date, Address, Captcha, or a WordPress-bound type like Post / User — see The form builder for the full list

isRequired

boolean

Yes

label

string

No

description

string

No

extra

array

No

Type-specific extra settings (default value, placeholder, etc.)

settings

array

No

Layout settings (alignment, columns, CSS classes, …)

validationRules

array

No

acpt/delete-form-field

Input

Property
Type
Required

formName

string

Yes

fieldName

string

Yes

Last updated