Affiliate Forms For Ninja Forms Installation and Usage

Important: This article relates to the Affiliate Forms For Ninja Forms pro add-on. The Affiliate Forms for Ninja Forms pro add-on requires the 3rd-party Ninja Forms plugin and AffiliateWP to be installed and active.

  1. Installing the Affiliate Forms for Ninja Forms add-on
  2. Creating an Affiliate Registration Form
  3. Displaying the Affiliate Registration Form
  4. Email Tags
  5. Add Affiliates to a Mailing List
  6. Using Ninja Forms add-ons
  7. Using a Ninja Form Redirect Action

1. Installing the Affiliate Forms for Ninja Forms add-on

Before we get started, be sure to install and activate AffiliateWP on your WordPress site.

Once you’ve got AffiliateWP installed and your license is verified, you’ll be able to quickly install and activate the Affiliate Forms for Ninja Forms add-on.

2. Creating an affiliate registration form

The Affiliate Forms For Ninja Forms pro add-on provides compatibility with both the current version of Ninja Forms, Ninja Forms 3, as well as older Ninja Forms 2.9 versions. Make sure to confirm the version of Ninja Forms you’re using, and refer to the section below for the Ninja Forms version you’re using.

Ninja Forms 3.0 or higher

1
With both Affiliate Forms For Ninja Forms and the Ninja Forms plugin installed, go to Forms » Add New
2
Add the form fields for affiliate registration. For the registration to be valid, you’ll need to add the following fields:
  • Email address
  • Affiliate Username

However, we recommend adding all of the registration fields available.

Once you’re on the New Form screen in Ninja Forms, AffiliateWP fields are located in Form Fields » AffiliateWP at the bottom of the section. It is important to use the Username field from this section vs creating your own text field and labeling it the Username field.  This also applies to the First Name, Last Name, and Email fields as well which can be found in the User Information Fields:

Use the Username field from the AffiliateWP section

select first , last name and email fields from User Information

The password field will not be visible in this section due to some previous Ninja Form plugin changes, however, we recommend adding it so your affiliate’s can set their password while registering.  This way they can login when ready (or approved) and not be redirected through a password reset process which is not the best on-boarding experience.  To access and add the Password and Password Confirm fields, scroll to the top of the field list and type ‘password’ in the top search area where it says Filter, and when visible, add them to your form.
Search for Password and Password confirm fields
3
When you are finished adding the fields you would like to include, click the Done button in the top-right corner, and then click to Publish your new Ninja Form.  Setup is not complete, but saving your form now is necessary.  You will return to this form in a later step to finish the affiliate registration configuration.
4
Next, shift over to the settings of AffiliateWP, go to Affiliates » Settings » Ninja Forms and select the form you just created to use for affiliate registrations and Save Changes.
Affiliates settings Ninja Forms
5
Now, head back into the Ninja Forms form edit area. We’ll need to tell Ninja Forms which fields should be used for AffiliateWP field data so the form submission can be recognized and create a new affiliate account.
Once back inside the form editing area, go to  Emails & Actions and click the + to add Affiliate Registration:
Emails n Actions add Affiliate Registration action
Next, click the cog wheel to bring up the Affiliate Registration field list. In each of the dropdown options, select the field to connect to the matching default affiliate registration field.  If you do not see a field to match with, make sure you added the correct field types as noted above in Step 2.
Affiliate Registration field list for mapping

Note: If you don’t see any fields at all, meaning it’s blank, head back to Step 4 and verify you completed the form selection. Until you set the Ninja Form you plan to use for affiliate registrations, the list of fields to connect will not appear.

And finally, at the top of this section, select whether or not you’d like the affiliate to automatically be logged in after submitting their affiliate registration:
Automatically log in the affiliate after registration
7
Make sure to click Done and  Publish the form again once you are ready.
8
That is it, you are finished!  Now it’s time to go test an affiliate registration!

Ninja Forms 2.9 or lower

1
With both Affiliate Forms For Ninja Forms and the  Ninja Forms plugin installed, go to Forms » Add New
2
While editing the form, go to Settings » Display (you may be asked to save the form), and enable the Use this form for affiliate registration checkbox
3
Add your desired fields and save

Note: You can only have one Ninja Form designated as the affiliate registration form.

3. Displaying the affiliate registration form

Displaying the affiliate registration form

There are 3 ways you can show the affiliate registration form:

1
Use the [affiliate_area] shortcode as you were before. AffiliateWP’s standard affiliate registration form will be replaced with the ninja form.
2
Use the [affiliate_registration] shortcode. AffiliateWP’s standard affiliate registration form will be replaced with the ninja form.
3
Use the shortcode provided by Ninja Forms to output the registration form.

4. Email Tags

The Affiliate Forms For Ninja Forms pro add-on provides compatibility with both the current version of Ninja Forms 3, as well as Ninja Forms 2.9 versions.  Make sure to confirm the version of Ninja Forms you’re using, and refer to the section below for the Ninja Forms version you’re using.

Nina Forms 3.x (or higher)

When Affiliate Forms For Ninja Forms is active a new slider option called CREATE AFFILIATEWP EMAIL TAG will be shown when you expand a single field in the form editor.

Ninja Forms 3.x and higher field editor

Nina Forms 2.9.x (or lower)

When Affiliate Forms For Ninja Forms is active a new checkbox option called  Create AffiliateWP email tag will be shown when you expand a single field in the form editor.

Nina Forms All Versions

When you enable these options and save, a new email tag will be available on the Affiliates » Settings » Emails tab.

You can use these email tags in any of the emails.

Some fields in the form editor do not have this checkbox option. This is because they are already mapped to the default email tags in AffiliateWP:

Username
Use the standard {user_name} email tag

Website URL
Use the standard {website} tag

Promotion Method
Use the standard {promo_method} tag

Email
Use the standard {user_email} tag

First Name and Last Name
Use the standard {name} email tag. If only the first name is entered by the affiliate, only this will be shown in the email. If the affiliate enters both a first name and last name, the email will show both. If neither a first name or last name is specified by the affiliate, the {name} email tag will output the affiliate’s username.

5. Add affiliates to a mailing list

Since the add-on uses Ninja Forms, you can use any of the mailing list add-ons available to add affiliates to a mailing list when they register. These include MailChimp, Campaign Monitor, AWeber and more.

See the add-ons

6. Using Ninja Forms add-ons

Since this add-on uses Ninja Forms, you can take advantage of any of the numerous add-ons available for Ninja Forms.

See the add-ons

7. Using a Ninja Form redirect action

The Affiliate Forms For Ninja Forms pro add-on provides compatibility with both the  current version of Ninja Forms, Ninja Forms 3, as well as older Ninja Forms 2.9 versions. Make sure to confirm the version of Ninja Forms you’re using, and refer to the section below for the Ninja Forms version you’re using.

If you use either the  [affiliate_registration] shortcode or the shortcode provided by Ninja Forms, you’ll need to set up a redirect in Ninja Forms in order to redirect the affiliate to the affiliate area after they’ve submitted the form.

Ninja Forms 3.0 or higher

While editing the affiliate registration form, go to the Emails & Actions tab of the form1Click or drag the  Redirect action onto the form:

2Click on the merge tags symbol in the top-right, and scroll to the merge tag “Affiliate Area”. Click on it to automatically add your affiliate area url:

Alternatively if you’re using a custom configuration, you can of course manually enter the URL of your affiliate area page as well.Once finished, click save. That’s it!


Ninja Forms 2.9 or lower

1
While editing the affiliate registration form, go to the Emails & Actions tab of the form
2
Click Add New
3
Give your action a  name, set the type to redirect, enter the URL of your affiliate area page, and click save