=== Ninja Forms ActiveCampaign Add-on ===
Contributors: digisavvy, nmenescardi
Tags: email, automation, crm, marketing, email marketing
Donate link: https://mailchimp.com
Requires at least: 5.1
Tested up to: 5.3
Requires PHP: 5.6
Stable tag: 3.1.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Power-up your email marketing efforts by connecting your Ninja Forms-powered WordPress site to the popular ActiveCampaign Email Marketing platform. Easily send form submissions to ActiveCampaign to create automated sequences and campaigns in a snap!

== Description ==
ActiveCampaign is the ultimate email marketing automation platform for businesses and professionals. Ninja Forms now integrates with ActiveCampaign’s powerful platform which means you can send the submissions from your form directly to AC and tag them and add them to the appropriate lists and initiate intelligent automation sequences, campaigns, and more.

== Installation ==
## Ninja Forms ActiveCampaign Add-on Documentation
* The Ninja Forms [ActiveCampaign add-on](#)(# "ActiveCampaign add-on") needs to be installed and activated to see the features mentioned in this this documentation.

* After you have downloaded the Ninja Forms for ActiveCampaign plugin, install the plugin via WordPress’s plugin installer. Once installed, be sure to activate the plugin.

## Authenticating with ActiveCampaign
In order to successfully use the Ninja Forms for ActiveCampaign plugin, you need to authenticate with ActiveCampaign using your ActiveCampaign url and API Key.

1. Login to your ActiveCampaign account dashboard.
2. Visit the _settings_ page of your ActiveCampaign account. You will see your account username in the upper-right-hand corner of your account dashboard. Click on it and then click _settings_.  
	    ![](#)(https://digisavvycdn.s3.amazonaws.com/Image_2018-03-20_17-36-53.png "ActiveCampaign Settings")
3. Once in the _settings_ area, click on _Developer_ tab from the left. Note and copy the _URL_ and _Key_ values within the API Access area. You’ll need them for the next step.  
	    ![](#)(https://digisavvycdn.s3.amazonaws.com/Image_2018-03-20_17-37-12.png "ActiveCampaign Developer Settings")  
	    Go back to your WordPress with the Ninja Forms ActiveCampaign plugin installed. 
4. Back in your WordPress, from the Ninja Forms menu, select _Settings_.
5. Scroll down to the _ActiveCampaign_ area and input your ActiveCampaign URL and API Key (from step 3).  
	    ![](#)(https://digisavvycdn.s3.amazonaws.com/Settings__NFAC__WordPress_2018-03-22_17-06-21.png "Ninja Forms Settings for ActiveCampaign")
## Enter your plugin license
1. From Ninja Forms menu, click _Settings_. 
2. Click on the _Licenses_ tab and enter your license key that you received when you purchased this plugin — alternatively you may visit your Ninja Forms Dashboard and [head over to the License Keys section](#)(https://ninjaforms.com/account/license-keys/ "Ninja Forms License Key Link") of your account.
## Adding an ActiveCampaign Action to Your Form
Under Ninja Forms, click _Add New_ to create a new form — or if you already have a form you can click on _Dashboard_ from the Ninja Forms Menu.
1. Once you’re inside of editor for your form, click _Emails & Actions_ from the top.
2. Click the _plus_ icon in the lower right to add an _Action_.
3. Under the _Installed_ section choose _ActiveCampaign_.
4. After choosing the _ActiveCampaign_ option, you will see a list field. Select the List your subscribers will be placed in. 
5. The \_List Field Mapping \_area will expand.  
	    ![](#)(https://digisavvycdn.s3.amazonaws.com/Form_Builder__NFAC__WordPress_2018-03-22_16-30-38.png "List Field Area")  
	    The fields that show here are from your ActiveCampaign account, these include both AC’s built-in fields and any custom fields you define. In order to map fields from your Ninja Forms to your ActiveCampaign fields, you’ll need to click the list field icon on each field where you wish to create a mapping.
6. This integration also allows you to assign tags to your Ninja Form that will be assigned to contacts who submit a form. You may assign multiple tags to a form in comma separated format.

## Enabling Double Opt-in functionality (Optional)
By default, ActiveCampaign will accept your new subscribers and enroll them to the appropriate list based on what you selected in your Ninja Forms actions. Generally, that works just fine! Depending on your needs, you may require that new subscribers confirm that they did, in fact, sign up for your list. ActiveCampaign has a double opt-in feature that you can utilize for this use case. So, ActiveCampaign has an interesting (read: not great) way of implementing double opt-in functionality.
1. You'll need to create a form in your ActiveCampaign account, or use an existing form with that account.
2. Login to your ActiveCampaign account and then go to _Forms_.
3. You may select an existing form or create a new form. **Note** Make sure that your form has an action to _subscribe to list_ and that you have list selected.
4. **New forms**
	- While in the forms screen, click the _New Form_ button.  
		![Click 'new form' to add a new form](#)(https://digisavvycdn.s3.amazonaws.com/DIGISAVVY_Email_Marketing_2018-04-09_14-38-41.png "Click 'new form' to add a new form")
	- Enter the title of your form
	- Make sure to add at least one action _Subscribe to List_ and assign a list to the action. This adds users to that list once they have confirmed their subscription.  
		![Setup and configure form](#)(https://digisavvycdn.s3.amazonaws.com/DIGISAVVY_Email_Marketing_2018-04-09_14-37-25.png "Setup and configure form")  
		And then click _Create_
	- On the next screen, you’ll be able to edit your form. Click the _Options_ tab on the right and then simply click the gear next to the _Subscribe to List_ action.  
		![Modify double opt-in action](#)(https://digisavvycdn.s3.amazonaws.com/DIGISAVVY_Email_Marketing_2018-04-09_14-33-15.png "Modify double opt-in action")
5. **Existing forms**
	- While in the forms screen, click the _Edit_ button next to form that you wish to configure double opt-in for.
	- On the next screen, you’ll be able to edit your form. Click the _Options_ tab on the right and then simply click the gear next to the _Subscribe to List_ action.
	- The next screen is the Edit Form Action configuration. Be sure that _Opt-in Confirmation_ is set to _on_.
	- Edit your opt-in email and actions as needed. And be sure to enter your business address.

**Kaboom!** That’s it, you’re done!! When a user submits a form their data will be sent to your ActiveCampaign account and their contact will be added to the appropriate list and tagged appropriately.

## Frequently Asked Questions
== Frequently Asked Questions ==
* Q: Can I use this without an ActiveCampaign Account?
* A: No, you must have an active account to use this plugin. The plugin will work with a trial ActiveCampaign account.  

## Upgrade Notice
== Upgrade Notice == 
* Initial release only works with v3.0 of Ninja Forms and above.

## Screenshots
== Screenshots ==
* [Image](https://camo.githubusercontent.com/2adafcda6f4e61e66a4fcac35e6c7961554e1035/68747470733a2f2f64696769736176767963646e2e73332e616d617a6f6e6177732e636f6d2f466f726d5f4275696c6465725f5f4e4641435f5f576f726450726573735f323031382d30332d32325f31362d33302d33382e706e67 "Action Configuration")

## Changelog
= 3.1.2 (07 March 2022)
  - Ensure missing credentials does not cause warnings

= 3.1.1 (10 January 2022)
  - Ensure metabox appears on new submission page

= 3.1.0 (August 2021)
- Add submission diagnostics to display per-submission responses
- Enable action level credentials to connect to multiple Active Campaign accounts
- Automatically update plugin settings credentials with action settings credentials if plugin settings not already 

= 3.0.7 (July 2021)
* Bug Fixes
- Fix licensing bug
- Fix `undefined index` bug

* Other
- Add workflows for automated build
- Update author name and URL in plugin header

= 3.0.6 =
* Corrected an issue that was causing too many API calls.
* Plugin should no longer always show available updates.
* Add Plugin description

= 3.0.5 =

= 3.0.4 =
* Resolved an issue where ActiveCampaign fields (in WordPress) would not update to reflect changes to existing or new fields made through the ActiveCampaign user dashboard.

= 3.0.3 =
* Resolved an issue with some custom fields from ActiveCampaign not being returned in Ninja Forms' Action.

= 3.0.2 =
* Resolved issue with data from list checkboxes not sending to ActiveCampaign API.

= 3.0.1 =
* Resolved an issue with automatic updates.

= 3.0 =
* Initial Release! Woot!
