CRED lets you build forms for creating and editing WordPress content. It also includes a comprehensive email notifications system, which sends notifications to both clients and site admins.

The form notifications in CRED are under the Notification section. You can create several notifications for the same form. Each notification has:

  • A name – to easily identify a notification
  • An option to enable or disable the notification
  • An event – when to send the notification
  • Email destination and source – who receives the notification and who sends it
  • Subject
  • Body

Notify when submitting content

A CRED form
A CRED form

When visitors submit content, CRED can send a notification email. It’s usually a good idea to send an email to the site admin and to the visitor (different notifications for each).

Send the notification when submitting the form

In the When to send this notification section, select When submitting the form.

When to send the notification
When to send the notification

Note: if you are using CRED Commerce and have payments enabled for this form, the notification option changes to notify when going to payment.

Send different notifications to the site admin and visitor

CRED lets you specify multiple recipients for the same notification email. All recipients will receive the same email and can see each other (except if you select them as BCC).

Where to send notifications
Where to send notifications

CRED Commerce note: you will see another option to ‘Send this notification to the billing email‘.

Normally, you would want to send two different notifications, with different content, to the site admin and the visitor who submitted the content.

The admin notification would tell that there is something new to review. The visitor notification would be a confirmation that their content was submitted and your explanation of what follows.

To send different notification emails, you should add new notifications and set each of their destination and content separately. You can create several notifications for the same event.

Send email notification to a user specified in a generic field

CRED also allows you to send email notification to a specific user specified in a generic field. For this to work, the key option to add to your generic field is generic_type. An example of a generic select field that can be used to specify a user that will receive the email notification:

[cred_generic_field field="wpcf-user" type="select" class="" urlparam=""]
{
"generic_type" : "user_id",
"required" : 1,
"validate_format" : 0,
"persist" : 1,
"default" : 12
"options" : [
{"value":"user1","label":"User1"},
{"value":"user2","label":"User2"},
{"value":"user3","label":"User3"}
]
}
[/cred_generic_field]

After you added a generic field for selecting the user to your form, you can select to send the notifications to users provided by this field. To do this simply scroll down to the Where to send this notification field and select the generic field as the option.

Options for sending the notifications to the user specified in the generic field
Options for sending the notifications to the user specified in the generic field

Who sends the notifications

By default, WordPress sends notifications from the site admin name and email. You can override it by setting a different ‘from’ email and name.

Notifications 'from' details
Notifications ‘from’ details

If you change the notifications ‘from’ email, make sure that notification emails can still go through via your email server.

Email subject and body

Finally, you need to enter the subject and body for the notification.

CRED notifications – Email subject and body
CRED notifications – Email subject and body

You can click on the Fields and Views Icon, or the Insert Subject/Body Codes icons to insert shortcodes from Views or CRED respectively, directly into your notification email subject or body.

Notify when content updates

Similarly to how we’ve created new-content notifications, we can also create additional notifications for when content changes.

If admins need to review newly submitted content, you probably want to send notifications to visitors, or clients, when their content is published.

For this, we will choose to send notifications When post status changes.

Then, select the post status. If you set it to Published, CRED will send the notification when the post gets published. This way, you can send automated emails when you publish content that was pending review.

When to use field conditions

Many sites with CRED implement ads and other paid-submission content. You might want to notify clients when their ads become ‘featured’. To do this, use custom fields filters for notifications.

You can set up notifications when custom fields change. For example, if you are using a custom field to indicate that an ad is featured, you can trigger notifications when that field is set or cleared.

Please note that you can not use complex fields for this kind of conditions. This includes the WYSIWYG and Multiple Lines fields.

Testing your notification email

You can click on the Send a test email to try-out your notifications. You’ll be prompted to enter a destination email address for your test mail.

CRED notifications - Send test email
CRED notifications – Send test email

Note: You must save your form to be able to Send a test email. You will need to have some text in your email body for test emails to be sent correctly.