=== Kreatív Mail Forms ===
Contributors: kreativoldal
Tags: newsletter, email marketing, elementor, divi, subscribe
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds subscribers from Elementor Pro and Divi contact forms to your Kreatív Mail newsletter list.

== Description ==

[Kreatív Mail](https://kreativmail.hu/) is a Hungarian email marketing service. This plugin connects your WordPress forms to your Kreatív Mail account, so visitors who sign up on your site land on your newsletter list automatically.

**Elementor Pro**

Adds a "Kreatív Mail" action to the Elementor Pro form widget (Actions After Submit). Per form you choose:

* the list,
* the email and name field IDs,
* an optional consent checkbox: only visitors who tick it are subscribed,
* an optional tag, which can start an automation in Kreatív Mail.

**Divi**

Add a checkbox field with the Field ID `hirlevel` to a Divi contact form. Visitors who tick it are added to the list chosen on the plugin's settings page (Divi 4.13.1 or newer).

**How it works**

* Existing subscribers are not duplicated. If someone unsubscribed earlier and now ticks the box again, they are resubscribed.
* If Kreatív Mail cannot be reached, the visitor's form submission still succeeds; the error is shown on the settings page.
* The list of your Kreatív Mail lists is fetched only when you open the settings page, never on the public site.

A Kreatív Mail account is required.

== External services ==

This plugin connects to the Kreatív Mail API (`https://app.kreativmail.hu/api/v1/`), operated by Kreatívoldal, to add form submitters to your newsletter list. Nothing is sent until you enter your API token.

* **When you open Settings → Kreatív Mail:** your API token is sent to fetch the names and IDs of your lists.
* **When a visitor submits a form you connected:** the visitor's email address and name, the chosen list ID and the optional tag are sent, together with your API token. For Elementor this only happens on forms where you added the Kreatív Mail action (and, if you set a consent field, only when the visitor ticked it). For Divi it only happens when the visitor ticked the `hirlevel` checkbox.

Kreatív Mail Terms of Service: https://kreativmail.hu/aszf/
Kreatív Mail Privacy Policy: https://kreativmail.hu/adatkezeles/

Make sure your form tells visitors that they are subscribing to your newsletter, and collect consent where the law requires it.

== Installation ==

1. Install and activate the plugin.
2. In your Kreatív Mail account, click your name in the top right corner → WordPress plugins, and copy your API token.
3. In WordPress go to Settings → Kreatív Mail, paste the token and save. Your lists appear on the page.
4. Elementor Pro: edit your form → Actions After Submit → add "Kreatív Mail", then choose the list in the "Kreatív Mail" section.
5. Divi: add a checkbox field with the Field ID `hirlevel` to your form, then choose the list under Settings → Kreatív Mail.

== Frequently Asked Questions ==

= Does it work with the free version of Elementor? =

No. Form actions are an Elementor Pro feature.

= I created a new list but Elementor does not show it. =

Open Settings → Kreatív Mail once; the plugin refreshes the lists there.

= How is the name split? =

On sites with a Hungarian locale the first word is the last name ("Kovács Anna"), on other sites the first word is the first name ("Anna Smith"). A single word is stored as the first name.

= What happens when I delete the plugin? =

All of its settings, including the API token, are removed from the database.

== Changelog ==

= 1.1.1 =
* Translations are now delivered by translate.wordpress.org (no bundled language files).
* Clearer hint where to find the API token.

= 1.1.0 =
* English source strings with a bundled Hungarian translation.
* Name order follows the site language.
* An unexpected API response is now reported on the settings page instead of being treated as success.

= 1.0.1 =
* Fixed API address; the address setting was removed.

= 1.0.0 =
* First release: Elementor Pro form action and Divi contact form support.
