Listing Form NotificationsExamplesParametersCreating Form NotificationsExamplesParametersGetting Form NotificationsExamplesParametersDeleting Form NotificationsExamplesParametersDuplicating Form NotificationsExamplesParametersUpdating Form NotificationsExamplesParametersEditing Form NotificationsExamplesParameters
By using the CLI Add-On for Gravity Forms, you can easily manage form notifications using the command line.
Listing Form Notifications
wp gf form notification list
Examples
Outputs a table listing the notifications for form 1.
wp gf form notification list 1
Outputs a table listing the active notifications for form 1.
wp gf form notification list 1 --active
Outputs the raw properties for the form 1 notifications.
wp gf form notification list 1 --raw
Parameters
Argument
Description
[--active]
Retrieves only active notifications.
[--format=
Defines the format in which the notifications will be listed.Accepted values: table, ids, csv, json, yaml, and count.Defaults to table.
[--raw]
Outputs the raw notification properties as a JSON string.
Creating Form Notifications
wp gf form notification create
Examples
Creates a new notification for form 1 with the specified name.
wp gf form notification create 1 'My Notification'
Creates a new notification for form 1 with the specified name and to address.
wp gf form notification create 1 'My Notification' --to='[email protected]'
Parameters
Argument
Description
[
The name to be assigned to the new notification.
[--to=
The to field value.Default: {admin_email}.
[--subject=
The subject field value.Default: New submission from {form_title}.
[--message=
The message field value.Default: {all_fields}.
[--to-type=
The send to type field value.Default: email.
[--event=
The event field value; when the notification will be sent.Default: form_submission.
[--notification-json=
The JSON formatted notification.
[--porcelain]
Outputs just the notification ID instead of the standard success message.
Getting Form Notifications
wp gf form notification get
Examples
Gets the JSON for the specified notification from form 1.
wp gf form notification get 1 596e4794a13a2
Parameters
Argument
Description
The ID of the notification to get.
Deleting Form Notifications
wp gf form notification delete
Examples
Deletes the specified form 1 notification.
wp gf form notification delete 1 596e4794a13a2
Deletes the specified form 1 notifications.
wp gf form notification delete 1 596e4794a13a2 574ff8257d864
Parameters
Argument
Description
The IDs of the notification to delete.
Duplicating Form Notifications
wp gf form notification duplicate
Examples
Duplicates the specified form 1 notification.
wp gf form notification duplicate 1 596e4794a13a2
Parameters
Argument
Description
The ID of the notification to duplicate.
[--porcelain]
Outputs just the new notification ID instead of the standard success message.
Updating Form Notifications
wp gf form notification update
Examples
Updates the specified form 1 notification from the supplied JSON.
wp gf form notification update 1 --notification-json='{snip}'
Updates the specified notification using the supplied JSON.
wp gf form notification update 1 abc1 --notification-json='{snip}'
Parameters
Argument
Description
[
The ID of the notification to be updated.
[--notification-json=
The JSON formatted notification.
Editing Form Notifications
wp gf form notification edit
Examples
Launch the editor for the specified form notification.
wp gf form notification edit 1 596e4794a13a2
Parameters
Argument
Description
The ID of the notification to edit.