The Gravity Forms User Registration Add-on provides a really neat feature when registering new users; User Activation. When this feature is enabled, users will be sent an activation link to the email with which they registered. The user must click the activation link in order to activate their account and finish the registration process.
By default, Gravity Forms will send the WordPress default user activation email. This email is a good and generic but often times you’ll want to customize the activation email to be more relevant to the form from which the user registered.
This tutorial demonstrates how you can easily create your own custom user activation emails using the Gravity Forms User Registration Add-on v3.2 and the power of Gravity Forms notifications.
Steps
- Create your registration form.
- Create your registration feed with User Activation enabled.
- Create a User Activation notification.
1. Create your registration form.
We’re going to assume you already know how to create a form. If you want to use the specific form we’ve created for this tutorial, click the “Download Form Export” button below. After you’ve downloaded the form export, you can import this form via the Form > Import/Export in your WordPress admin menu.
2. Create your registration feed with User Activation enabled.
Again, we’re going to assume you already know how to create a registration feed with the Gravity Forms User Registration add-on. If not, check out the documentation. Here’s how we’ve configured our user registration feed.
There are two points to note about this configuration.
- Whatever Email field you map to the “Email Address” setting should be the same Email field you send the custom notification to in Step 3 (below).
Make sure you’ve enabled the “User Activation” setting and selected “manually” from the delivery method drop down which appears when the setting has been checked. The other option is “by email”.
While we do want to send the user activation notification by email, we don’t want to use the default email. Setting this option to “manually” will disable the default user activation email from being sent.
3. Create a User Activation notification.
We’re ready to create our custom user activation notification. There are a few steps to this process.
- Go to the “Notifications” tab on the “Form Settings” page.
- Click “Add New” on the Notifications List view to add a new notification.
- Set the “Event” setting to “User is pending activation”. This means this notification will be sent any time a new pending user activation is created.
- Set the “Sent To” setting to “Select a Field”.
- Set the “Send to Field” setting to the Email field that corresponds to the user’s registered email.
- Create your custom message in the “Message” setting and make sure to include the “{activation_url}” merge tag. This will generate the activation url which the user must click to activate their account.
Here’s what our notification looks like with each step indicated.
And here’s what that notification looks like when send to the user.
You probably noticed there are quite a few notification events added by the Gravity Forms User Registration add-on. Here’s a quick breakdown on what they are and when they are triggered.
- Site is created: Send a notification when a site has been created via a User Registration feed. Only applicable to multisite installs.
- User activation: Send a notification after a user has submitted a User-Registration-enabled form. Provides support for the {activation_url} merge tag so the user can click the link to activate their registration.
- User is activated: Send a notification after the user has been successfully activated.
- User is registered: Send a notification after the user has been successfully registered. Remember that when a user is activated they are also registered.
- User is updated: Send a notification after the user has updated their profile data via a User-Registration-enabled form.
What questions do you still have?
Do you still have any questions about this process? We aim to be exhaustive in our coverage of Gravity Forms topics. Let us know if we missed something you want to know about in the comments below!