Ninja Forms

Ninja Forms 3.0 or higher

Ninja Forms 3.0 and higher is supported.

Initial setup

  1. Ensure AffiliateWP is installed and activated.
  2. Ensure Ninja Forms version 3.0+ is installed and activated.
  3. To enable integration with Ninja Forms, go to AffiliateWP » Settings » Integrations and check the box next to Ninja Forms. Click Save Changes

In the WordPress admin menu, go to Forms and click the Add New button.

  1. Click on the “Just click here and select the fields you want.” link to start building your form. Add at least a couple of fields (for example, First Name and Email).
  2. You will also be required to add a Submit button.
  3. To enable referrals to be generated for this form, go to the Emails & Actions tab. Click the Plus (+) icon in the bottom right corner of the page.
  4. Click the Add Referral option under the Installed section. This will add a new Action called “Add Referral” to the form. New “Add Referral” action added:
  5. When the Add Referral action has been added, your form will now generate $0.00 referrals for affiliates who refer form submissions.  If this is OK for your setup, you are finished!
  6. If you would like AffiliateWP to calculate a specific referral amount for each form submission, or set a specific referral Description or Referral Type (Sale, Opt-in, or Lead), click on the cog icon next to Add Referral to edit the action. You’ll see some new options appear on the right-hand side of the page.  Ninja Forms actions add referral
  1. To calculate a specific referral amount for each submission (using a referral rate type of percentage), you will need to add optional fields to store values such as quantity and pricing if you’d like the user to select/set these values before submitting the form.   You can name these fields whatever you like.
  2. To perform a calculation, Use the Advanced – Calculations action to perform any multiplication, addition, etc. to come up with a total. Helpful video tutorial on how to use the Calculations feature in Ninja Forms: https://ninjaforms.com/docs/calculations/.
Ninja Forms calculations

Otherwise, you can place a single numeric value in a field of your choice to be used for the final referral calculation in the next

  1. AffiliateWP will use the global Referral Rate and Referral Rate Type (as set in AffiliateWP » Settings » General) to calculate an affiliate commission based on the amount you enter in the TOTAL FIELD above.

     

    Example of setting a Flat Rate referral rate: If Ninja Forms is your only integration with AffiliateWP and you wish to generate a $2.00 affiliate commission for a form submission, you could enter a Flat Rate of “2″ in AffiliateWP’s General settings. Now, when an affiliate refers a visitor, and the visitor completes and submits this form, a commission of $2.00 will be generated for the affiliate and there isn’t a need for setting a total amount.

    Example of setting a Percentage referral rate: If you wish to use a Percentage referral rate type (e.g. you have multiple integrations and/or forms, or you would prefer to work with percentages), and you wish to generate a $5.00 affiliate commission on every submission of this particular form, you could set a global Referral Rate of 20% in AffiliateWP’s General settings, and enter “25.00″ in the field you are using as your TOTAL FIELD assignment you’ll set below. When an affiliate successfully refers a visitor, and the visitor completes and submits this form, a commission of $5.00 will be generated for the affiliate.

Final steps: Mapping the form with merge tags

If you have set up your form to calculate a specific referral rate based on final total amount field, follow the steps below.

  1. Click on the click on the cog icon next to Add Referral to edit the action. You’ll see some new options appear on the right-hand side of the page.
  2. In the Total field, click on the menu icon. Select the corresponding merge tag from your form. As per the below example, the merge field tag is Total, but the field can be named whatever you like.
  3. For any other fields in your form, click on the menu icon. Select the corresponding merge tag from your form. As per the below example, we’ve merged the email field in the form with the Email merge tag. Repeat this step as necessary to map your form.
  4. In the Description field, enter some text that clearly describes where the referral came from, such as “My Contact Form” or “My First Product”, etc.
  5. Click the Done button.
  6. Click the Publish button.
  7. If you haven’t already given your form a title, you’ll be prompted to do so. Give your form a title and click Publish again.

Your form is now ready to insert on any page or in any post! Now, when an affiliate refers someone to your site, and that person completes this form, the affiliate will be awarded a commission based on what you have set in the form and/or AffiliateWP’s General settings.