February 22, 2017: Updated "User activation" to "User is pending activation" due to Gravity Forms User Registration label change.
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.
We’ve got you covered with Gravity Forms Better User Activation.
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!
Did this resource help you do something awesome with Gravity Forms?
Then you'll absolutely love Gravity Perks; a suite of 47+ essential add-ons for Gravity Forms with support you can count on.
Hi! The {activation_url} link is successfully sent to the user, and a click on it also successfully redirects and sends the user a mail of his/her account being activated. However, when the user attempts to login thereafter, it says; ‘ERROR: Your account is still pending approval’. How can this be sorted?
Hi Emmanuel, when testing locally, it seems to work as expected. Maybe there’s some cache settings interfering here. If you have an Advanced or Pro license, you can reach out via our support form, and we should be able to help.
Best,
Hello, wondering if there’s a way to customize the activation url? Current: https://domainname.com/?gfur_activation=123456789 Desired: https://bitsinthesticks.com/?custom_term_activation=123456789
Thank you,
Hi Jerry,
This is probably a question better addressed by the Gravity Forms Support team since they are the add-on developers. If you have an active Gravity Perks license and you are using Better User Activation perk you can reach us out via our support form so we can dig into this.
Best,
Is there a way to display ‘Resend Activation Mail’ button for users? There might be some users that did not activate and try to login. Currently in this case, ‘There is no username’ error apears.
Hi Sam,
We do not have a solution to this. This looks like functionality for Gravity Forms to include in their GF User Registration addon, so I will suggest you get in touch with the Gravity Forms Support team.
Best,
Regarding the link for resetting password that is sent in the login email.. seems it’s still incorrect as of 4.6.3.
The code says : $key = wp_generate_password I think it should be: $key = get_password_reset_key
Hi Gino,
You may want to get in touch with Gravity Forms Support with this, so they address it within the Gravity User Registration Addons plugin.
Best,
Hey,
Once the user opens the page for the activated account, he or she gets an email to reset the password. I would like to provide a link for resetting the password on the account activation page. Is there a way to disable email for resetting password because the link for resetting password in the email is wrong?
Thanks
Hi Bayu, I believe the issue you’re experiencing was addressed in GFUR 4.6.
Can you confirm?
Hi David, thanks for the answer, but that’s not the answer I want. GFUR version is correct. I want to know if there is a way to disable the password reset email when the account activation page is opened?
I’m not 100% but I think configuring your User Registration settings like this should prevent Gravity Forms from automatically sending a Set Password link email.
Hi, I tried changing the activation link email and it works, but the default activation link is still sending so the user gets 2 activation links. Is there a way to disable the default e-mail?
Hi Ace,
Can you confirm if you’ve set the option to enable User Activation to Manually as seen in the image here. In case you’ve already done this but still experiencing this issue, we’ll have to take a closer look at your setup. If you have a Gravity Perks License, you can send us a message via our support form so we can dig into this.
Best,
The default activation link is not sending again when I change the option to Manually . Thank you for the answer
Unfortunally the {activation_url} link is not displayed in the email my user received after (succeed test) payment..
Any suggestions?
Hello Désirée, Is anything displaying in the email? Currently what is the setup? If you have a Gravity Perks account, could you please drop us a line through our support channel here, we would be more than happy to take a deeper dive.
Hey Guys, We recently (today) did a full apples to apples copy/paste exercise with this tutorial and it’s not working. The machine is ignoring the new activate.php (possibly the function in the functions.php?) and is displaying the core activation message. Could there be a plugin conflict? Using WooCommerce as well. Thoughts? Thanks so much for providing this tutorial. I hope I can get it working for me. T
Hello Todd,
Thank you for that bit of information. I have forwarded this request to our development team and we are looking into a possible solution. Thank you for your patience with all this. 😃