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
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
acpt/list-forms
No input required.
$result = wp_get_ability('acpt/list-forms')->execute();acpt/get-form
Input
name
string
Yes
$result = wp_get_ability('acpt/get-form')->execute([
'name' => 'contact-us',
]);acpt/save-form
Input
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
acpt/delete-form
Input
name
string
Yes
acpt/get-form-field
Input
formName
string
Yes
fieldName
string
Yes
acpt/save-form-field
Input
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, …)
acpt/delete-form-field
Input
formName
string
Yes
fieldName
string
Yes
Last updated