Actions Overview
Actions are the automation layer of Core Forms. When a form is submitted successfully, one or more actions fire to process the submission data -- sending emails, subscribing to newsletters, posting to Slack, creating CRM contacts, and more.
How Actions Work
- A user configures actions in the Actions tab of the form editor.
- Each action has a type (e.g.,
email,webhook,slack) and its own settings. - On successful submission, Core Forms fires the
cf_form_successhook. - Each configured action is dispatched via
do_action( "cf_process_form_action_{$type}", $settings, $submission, $form ).
Actions only fire for legitimate submissions. Spam submissions are stored but never trigger actions.
Built-in Actions
Core Forms ships with 21 action types:
| Action | Class | Description |
|---|---|---|
email |
Email |
Send email notification |
autoresponder |
AutoResponder |
Auto-reply to submitter |
webhook |
(extension) | POST data to external URL |
mailchimp |
MailChimp |
Subscribe to Mailchimp list |
mailerlite |
MailerLite |
Add to MailerLite group |
convertkit |
ConvertKit |
Add to ConvertKit form |
drip |
Drip |
Add to Drip campaign |
brevo |
Brevo |
Add to Brevo (Sendinblue) list |
activecampaign |
ActiveCampaign |
Add to ActiveCampaign list |
fluentcrm |
FluentCRM |
Add to FluentCRM list |
hubspot |
HubSpot |
Create HubSpot contact |
slack |
Slack |
Post message to Slack channel |
discord |
Discord |
Post message to Discord webhook |
telegram |
Telegram |
Send Telegram message |
twilio_sms |
TwilioSms |
Send SMS via Twilio |
google_sheets |
GoogleSheets |
Append row to Google Sheet |
airtable |
Airtable |
Create Airtable record |
notion |
Notion |
Create Notion page |
zapier |
Zapier |
Trigger Zapier webhook |
make |
Make |
Trigger Make (Integromat) scenario |
create_post |
CreatePost |
Create a WordPress post |
create_user |
CreateUser |
Register a WordPress user |
create_article |
CreateArticle |
Create a custom article post |
emailit |
Emailit |
Send email via Emailit API |
emailit_subscribe |
EmailitSubscribe |
Subscribe via Emailit |
mailerpress |
MailerPress |
Subscribe via MailerPress |
fluent_community |
FluentCommunity |
Add to Fluent Community |
Conditional Actions
Each action supports conditions that control whether it fires. Conditions evaluate against submission data:
// Example action settings with a condition
$action = [
'type' => 'email',
'to' => 'sales@example.com',
'subject' => 'New lead',
'message' => '[all:label]',
'conditions' => [
[
'field' => 'department',
'operator' => 'equals',
'value' => 'sales',
],
],
];
Multiple Actions Per Form
Forms can have any number of actions. They execute in the order they appear in the Actions tab. Each action is independent -- if one fails, the others still run.
Custom Actions
You can create custom actions by extending the Action base class. See Custom Actions for a full guide.
use Core_Forms\Actions\Action;
use Core_Forms\Form;
use Core_Forms\Submission;
class MyCustomAction extends Action {
public $type = 'my_custom';
public $label = 'My Custom Action';
public function page_settings( $settings, $index ) {
// Render admin settings fields
}
public function process( array $settings, Submission $submission, Form $form ) {
// Process the submission
}
}
// Register it
$action = new MyCustomAction();
$action->hook();
Action Lifecycle
Form submitted
-> Validation passes
-> Submission saved to database
-> cf_submission_inserted fires
-> cf_form_success fires
-> Each configured action's process() method is called
-> ActionLogger records success/failure per action
-> JSON response returned to browser