Cornerstone Forms Actions

The Actions Framework controls what happens after a Form is submitted and allows you to define how that data is processed, stored, and used.

  1. Action Chains
  2. Post Actions
  3. Attachment Actions
  4. User Actions
  5. Term Actions
  6. Comment Actions
  7. Option Actions
  8. Other Actions
  9. Advanced Actions
  10. Summary

When a form is submitted, Actions define what happens next. That could mean creating content, updating data, sending notifications, logging users in, or communicating with external services.

In other words, Actions are the automation engine behind Cornerstone Forms.

Actions can also contain Inner Actions, allowing you to build powerful workflows where one step feeds into another. Many Actions return data that can be used later in the chain. For example, when you create a post, the action returns the Post ID. That ID can then be used in a later action to update an ACF field, attach metadata, or include the new Post ID in an email notification.

Action Chains

Actions are not limited to running one task at a time. In Cornerstone Forms, you can chain multiple Actions together, allowing a single form submission to trigger an entire workflow.

Each action runs in sequence, and many Actions return data that can be used by the Actions that follow. For example, a single form submission might:

  1. Create a new post
  2. Attach metadata to that post
  3. Assign a taxonomy term
  4. Upload files to the Media Library
  5. Send a confirmation email
  6. Notify your team in Slack
  7. Redirect the user to a success page

Because Actions can pass data forward, you can build powerful automation pipelines where each step builds on the previous one. In many cases, what would normally require multiple plugins, custom code, or external automation tools can be accomplished directly inside your form.

Post Actions

Post Actions allow your forms to create, update, or delete WordPress posts and their associated metadata. This makes it possible to turn form submissions into real content on your site, whether you're creating new posts, updating existing records, or managing post metadata.

Post Create / Update

This action creates a new post or updates an existing one. If you provide an ID, the specified post will be updated. If no ID is provided, a new post will be created. After the action runs, the Post ID is returned so it can be referenced in later Actions.

  • Type — The post type to create or update, such as post, page, or any custom post type registered on your site.
  • ID — The ID of the post to update. Leave empty to create a new post.
  • Title — The post title.
  • Content — The post content. If left blank, the content of an existing post will not be changed.
  • Meta — Optional key/value pairs to store as post meta on the created or updated post.
Post Create

Post Delete

This action deletes a post using the ID you provide. An ID is required — the action will produce an error if none is provided.

  • ID — The ID of the post to delete.
  • Trash — When enabled, the post is moved to the trash instead of being permanently deleted.
Post Delete

Post Meta Update

This action updates a post meta key, or creates it if none exists.

  • ID — The ID of the post to update meta on.
  • Meta Key — The meta key to update or create.
  • Meta Value — The value to store.
  • Add — When enabled, if a value already exists for this key, a second value is added alongside it rather than overwriting it. This allows a single meta key to hold multiple values. If the key does not exist yet, it will be created regardless.
Post Meta Update

Post Meta Delete

This action deletes all meta values for a given key on a post.

  • ID — The ID of the post to delete meta from.
  • Meta Key — The meta key to delete.
Post Meta Delete

Attachment Actions

Attachment Actions let you manage files in the WordPress Media Library directly from a form. You can delete an existing attachment or trigger a file download for the user who submitted the form.

Attachment Delete

This action deletes a Media Library attachment using the ID you provide. If the attachment does not exist, the action will produce an error. You can optionally bypass the trash to permanently delete the file.

  • ID — The attachment ID to delete.
  • Bypass Trash — When enabled, the attachment is permanently deleted rather than moved to the trash.

Attachment Download

This action serves a Media Library file as a download directly to the user's browser. Once the download is triggered, the page exits and no further Actions will run. For this reason, the Attachment Download action should always be placed last in your action chain.

  • ID — The attachment ID of the file to download.

User Actions

User Actions allow your forms to create, update, and manage WordPress users and their associated metadata. This makes it possible to build workflows for user registration, account updates, authentication, and profile management directly from a form.

User Create / Update

This action creates a new user or updates an existing one. If you provide an ID, the specified user will be updated. If no ID is provided, a new user will be created. After the action runs, the User ID is returned so it can be referenced in later Actions. When creating a new user, both Username and Password are required.

  • ID — The ID of the user to update. Leave empty to create a new user.
  • Username — The login name for the user. Required when creating a new user.
  • Password — The user's password. Required when creating a new user.
  • Email — The user's email address.
  • URL — An optional website URL associated with the user's profile.
  • Add Roles — One or more roles to assign to the user.
  • Remove Roles — One or more roles to remove from the user.
User Create

User Delete

This action permanently deletes a user by ID. If no ID is provided, the action will produce an error. You can optionally reassign the deleted user's posts to another user before deletion.

  • ID — The ID of the user to delete.
  • Reassign — A user to reassign the deleted user's posts to. If left empty, their posts will not be reassigned.
User Delete

User Meta Update

This action updates a user meta key, or creates it if none exists. A User ID is required.

  • User ID — The ID of the user to update meta on.
  • Meta Key — The meta key to update or create.
  • Meta Value — The value to store.
User Meta Update

User Meta Delete

This action deletes a user meta entry by key. A User ID is required.

  • User ID — The ID of the user to delete meta from.
  • Meta Key — The meta key to delete.
User Meta Delete

User Password Reset

This action resets a user's password to the value you provide and immediately signs them back in with the new password.

  • User — The user whose password will be reset. Defaults to the currently logged-in user.
  • New Password — The new password to set.
Password Reset Action

Login

This action logs a user into your site using a username and password. If the credentials are invalid, a form error is displayed.

  • Username — The user's login name or email address.
  • Password — The user's password.
  • Remember — When enabled, the session cookie persists beyond the current browser session so the user stays logged in.
  • Secure Cookie — When enabled, the session cookie is only sent over HTTPS. Defaults to enabled when your site is running HTTPS.
Login Action

Term Actions

Terms (taxonomies) are one of the core organizational systems in WordPress. They power everything from blog categories and tags to product attributes and brand groupings. Terms allow posts to be connected through shared attributes, making them useful for filtering, relationships, and structured content.

Term Create / Update

This action creates a new term or updates an existing one within a specific taxonomy. If a term with the given name already exists in the taxonomy it will be updated; otherwise a new term is created. The Term ID is returned after the action runs so it can be referenced in later Actions. Both Term and Taxonomy are required.

  • Term — The name of the term to create or update.
  • Taxonomy — The taxonomy the term belongs to, such as category, post_tag, or any custom taxonomy registered on your site.
  • Alias Of — The slug of another term to make this term an alias of. Leave empty to ignore.
  • Parent — The ID of a parent term, for hierarchical taxonomies like categories. Leave empty to create a top-level term.
  • Slug — A custom URL slug for the term. If left empty, a slug is auto-generated from the term name.
  • Description — An optional description for the term.
Term Create

Term Delete

This action deletes a term from a taxonomy by its name or ID. Both Term and Taxonomy are required — the action will produce an error if either is missing or if the term cannot be found.

  • Term — The name or ID of the term to delete.
  • Taxonomy — The taxonomy the term belongs to.
  • Default — The ID of a term to assign to any posts that were using the deleted term. Only applies when a single matching term is found.
  • Force Default — When enabled, the default term is assigned to affected posts even if they would have otherwise kept another term.
Term Delete

Comment Actions

Comment Actions allow your forms to create WordPress comments programmatically. This is useful for building custom comment forms, feedback tools, or any workflow that needs to attach a comment to a post on form submission.

Comment Create

This action creates a new comment on a post. All fields are pre-populated with sensible defaults using dynamic values from the current user and post context, but each can be overridden with form data or a custom value.

  • Author — The display name of the comment author. Defaults to the current user's display name.
  • Email — The email address of the comment author. Defaults to the current user's email.
  • IP — The IP address of the commenter. Defaults to the current visitor's IP address.
  • Author URL — A URL associated with the comment author.
  • Post ID — The ID of the post the comment will be attached to. Defaults to the current post.
  • Approved — Whether the comment is immediately visible. When disabled, the comment is held for moderation.
  • Content — The body text of the comment.
  • Meta — Optional key/value pairs to store as comment meta.

After the action runs, the Comment ID of the newly created comment is returned, allowing you to reference it in later Actions.

Comment Create

Option Actions

Option Actions allow forms to read and write values in the WordPress options table — the same database table that stores settings for plugins and themes. These Actions are useful when you need to persist a value site-wide, such as saving a configuration setting or storing a reference that other parts of your site can access.

Option Update

This action creates or updates a WordPress option by key. If the option already exists its value is overwritten. If it does not exist, a new option is created.

  • Key — The option key to update. The dropdown is populated from existing options in your database.
  • Value — The new value to store for that key.
  • Autoload — When enabled, this option is loaded into memory on every page load. Only enable this if the option is used globally across your site, as autoloading rarely-used options adds unnecessary overhead.

Option Delete

This action permanently deletes a WordPress option by its key.

  • Key — The option key to delete. The dropdown is populated from existing options in your database.

Other Actions

Other Actions provide additional functionality that supports common form workflows. These Actions handle tasks such as sending emails, redirecting users after submission, processing file uploads, triggering custom validation errors, and communicating with external APIs.

Email

This action sends an email when a form is submitted. For reliable delivery, connect your WordPress site to a trusted email provider using a plugin like WP Mail SMTP. This allows WordPress to send through services such as SendGrid, Gmail, or Amazon SES, which helps prevent messages from being flagged as spam.

  • From — The sender address that will appear in the email's From field.
  • Subject — The subject line of the email. This field is required — the action will produce an error if left empty.
  • To — A list of recipients. Each entry accepts a name and an email address.
  • CC — Optional list of addresses to copy on the email.
  • BCC — Optional list of addresses to blind copy.
  • Headers — Custom email headers as key/value pairs, for advanced use cases.
  • Attachments — Optional files to attach to the email.
  • Message — The body of the email. Supports HTML and can include dynamic form data.
Email Action

Redirect

This action redirects the user to another page. Once a redirect occurs, any Actions that follow it will not run since the user has already been sent to a new page. For that reason, this action should almost always be placed at the end of your action chain.

  • Location — The URL to redirect the user to.
  • Status — The HTTP status code for the redirect. Defaults to 302 (temporary redirect). Use 301 for a permanent redirect that browsers and search engines will cache.
  • X Redirect By — Sets the X-Redirect-By HTTP header, which identifies what initiated the redirect. Defaults to WordPress and rarely needs to be changed.
Redirect

File Upload

This action processes a file input and creates a Media Library entry in WordPress. It can also handle multiple file uploads in a single submission. After the action runs, the attachment ID (or an array of IDs for multiple files) is returned so it can be referenced in later Actions.

  • Name — The name used in the File input element on your form. This must match exactly.
  • Create Media — When enabled, a Media Library entry is created for each uploaded file.
  • Allow Multiple — When enabled, multiple files submitted under the same input name are all processed and uploaded.
File Upload

Custom Error

This action generates a validation error based on custom logic. It is particularly useful when you need validation rules that are not covered by the built-in validation system. By combining this action with Conditions, you can display an error whenever a specific condition is met.

  • Message — The error message displayed to the user when this action runs.
Custom Error

External API

This action sends a request to an external service using a configured API connection. It requires the External API feature to be enabled and is commonly used for webhooks and third-party integrations. The available controls mirror those found in the External API configuration.

External API

Slack Message

This action posts a message to a Slack channel using a webhook.

  • URL — The webhook URL generated in Slack.
  • Message — The message that will appear in the Slack channel. This field can include form data so your team receives useful context when a form is submitted.

To generate a webhook URL, visit the Slack App Page and click Create New App. If you do not have a manifest, select From Scratch.

Slack API Dashboard

After creating the app, navigate to Incoming Webhooks and enable the feature. At the bottom of the page you can create a new webhook and choose which channel it should post to. Slack will then provide the webhook URL to use in the URL field.

Slack Message

Mailchimp

Mailchimp is a popular platform for managing email marketing and subscriber lists. Cornerstone Forms can add or remove subscribers using the Mailchimp Subscribe action.

  • API Key — Your Mailchimp API key. Leave this blank to use the key saved in Cornerstone Settings, which allows it to be shared across all forms on your site.
  • List — The audience list to modify. This dropdown auto-populates once your API key is saved in Cornerstone Settings.
  • Email — The email address to subscribe or unsubscribe.
  • Status — The action to perform: Subscribed adds the address to your list, Unsubscribed removes them, and Pending sends a confirmation email that the user must accept before being added (double opt-in).
  • First Name and Last Name — Optional fields that attach additional information to the subscriber record.
Mailchimp Subscribe

To obtain your Mailchimp API key, open the Mailchimp dashboard and generate a key under Account > Extras > API Keys. Saving this key in Cornerstone Settings allows the List dropdown to auto-populate across all your forms.

Mailchimp Settings

Advanced Actions

Advanced Actions unlock some of the most powerful capabilities in Cornerstone Forms, allowing you to interact directly with your database or run custom PHP logic. Because of their power, they should be used carefully and tested in a staging environment before being deployed to a live site. To enable them, open Cornerstone Settings, navigate to the Forms tab, enable Advanced Mode, and save.

Advanced Mode Settings

SQL

This action executes a custom SQL query directly against your WordPress database. The result of the query is returned and can be used in later Actions.

  • Variables — A list of values to inject into your query. Each variable is referenced positionally in the SQL using a typed placeholder: %s for strings, %d for integers, %f for floats, and %i for identifiers such as table or column names. Variables are automatically escaped to protect against SQL injection.
  • SQL — The query to execute. Reference your variables in the order they appear in the Variables list.

For example, to update an option using two variables:

UPDATE wp_options SET option_value = %s WHERE option_name = %s
SQL Action

PHP

This action runs custom PHP code when a form is submitted. You do not need to include the <?php opening tag. All form data is accessible through the $formData variable.

PHP Action

Summary

Actions transform Cornerstone Forms from simple input collection into a powerful automation system. By chaining Actions together and passing data between them, a single form submission can create content, update records, trigger integrations, and power entire application workflows — including ACF Actions — all directly inside Cornerstone.

See something inaccurate? Let us know