=== mez eSoft Lead Submission ===
Contributors: mezbilisim
Tags: crm, leads, contact form, form submissions, lead capture
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.6.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sends submissions from your site's forms to mez eSoft. Forms are detected automatically and setup takes one click.

== Description ==

This plugin connects the contact and quote forms on your WordPress site to your mez eSoft account. When someone fills in a form, the submission appears immediately in the Leads list in mez eSoft, where your team can assign it, call the person back and turn it into a deal.

**Setup is one click.** You press "Connect with mez eSoft", open the approval page and approve it, and you are done. There is no key to copy, no address to paste and no webhook to configure.

**Your forms are detected automatically.** The plugin works out which field is the phone number and which is the e-mail address. If a guess is wrong you can correct it on the Forms tab. Fields that do not match anything are kept as well and shown on the lead record, so no data is discarded.

**Submissions are not lost.** If the connection breaks temporarily, submissions that could not be sent wait on your site and are transferred automatically once the connection is restored.

= Supported form plugins =

* Contact Form 7
* WPForms
* Elementor Forms (Pro)
* Forminator
* Gravity Forms
* Fluent Forms
* Ninja Forms
* Plain HTML forms written into the theme (optional)

= Interface language =

The plugin's admin screens are in Turkish, because mez eSoft is used by clinics in Turkey. Translations are welcome through translate.wordpress.org.

= Privacy and third party service =

This plugin sends form submissions to your mez eSoft account. All communication goes to mez eSoft servers at https://app.mezesoft.com and nothing is sent anywhere else.

What is sent, and when:

* **When you connect the site** (once, and only after you press the button): your site address and your site title, so that you can recognise the site on the approval screen.
* **When a visitor submits a form** (only for forms you leave enabled): the values entered into the form fields (name, phone, e-mail, message and any other fields on your form), the form's name, and the address of the page the form was submitted from.
* **Once a day, automatically, while the site is connected**: a short "still here" signal that carries no visitor data. It reports only your site address and the plugin version, so that mez eSoft can show whether the connection is still alive and whether the plugin needs updating. This stops when you disconnect the site or deactivate the plugin.

Your site address and the plugin version are also included in the request headers of the calls above.
Privacy policy: https://mezesoft.com/gizlilik-sozlesmesi/
Terms of use: https://mezesoft.com/kullanim-kosullari/

The service is operated by MEZ Bilisim A.S. The plugin requires a mez eSoft account to work. Visitor data is transferred only after you have connected the site, and only for the forms you leave enabled. No request is made to any external host before you connect the site.

== Installation ==

1. Install and activate the plugin.
2. Open the "mez eSoft" page from the admin menu.
3. Press the "Connect with mez eSoft" button.
4. Open the approval page with the button shown, check the site address and approve it.

That is all. Your forms are detected automatically and start being transferred.

== Frequently Asked Questions ==

= I do not have a mez eSoft account, is the plugin useful? =

No. The plugin transfers submissions to your mez eSoft account; without an account there is nowhere to send them.

= Can I choose which forms are transferred? =

Yes. You can switch each form on or off individually on the Forms tab. All forms are enabled by default.

= What if the field mapping is wrong? =

On the Forms tab you can pick manually which mez eSoft field each form field goes to. A manual choice always overrides the automatic guess.

= Are submissions lost if mez eSoft cannot be reached while the site is connected? =

No. Submissions that could not be sent wait on your site and are sent automatically once the connection is restored. The Status tab shows how many are waiting and lets you send them immediately.

= Does the plugin contact mez eSoft when nobody fills in a form? =

Yes, once a day, and only while the site is connected. It is a short signal that carries no visitor data; it reports your site address and the plugin version so that mez eSoft can show the connection as alive and tell you when an update is needed. Disconnecting the site or deactivating the plugin stops it.

= I have a hand written HTML form in my theme, is that transferred too? =

Yes, if you enable "Also capture HTML forms embedded in the theme" under Advanced settings. This mode inspects every form submission on the site, so it is disabled by default. Fields whose names look sensitive (password, card, national ID) are never transferred in this mode.

== Screenshots ==

1. Connecting takes one click: no key to copy, no address to paste.
2. Forms on your site are detected automatically; field mapping is guessed and you can change it.
3. Connection status and transfer counters.
4. Submissions that could not be sent are listed with the reason, so nothing disappears silently.

== Changelog ==

= 1.6.1 =
* Field names arriving from plain HTML forms are now sanitised as well, not only their values.
* Update and connection notices are shown on the Plugins screen and the plugin's own pages instead of every admin screen, and can always be dismissed.
* The approval page is now opened with the button on screen rather than automatically.
* Corrected the terms of use link and the tested WordPress version.

= 1.6.0 =
* The plugin now reports once a day that it is still running, so the connection is shown as live in mez eSoft even on sites whose forms are filled in rarely.
* A site whose plugin has been removed or switched off is now marked in the panel instead of appearing healthy.
* An update notice is cleared as soon as the update is done, without waiting for the next submission.

= 1.5.2 =
* The readme is now in English, as required by the plugin directory.
* Removed a redundant translation loading call and hardened a database query.

= 1.5.1 =
* Full compliance with the WordPress coding standards; admin notice text is no longer carried in the address bar.

= 1.5.0 =
* The plugin version is reported to mez eSoft; each site's version is visible in the panel.
* An admin notice appears when an update is needed. If a version that transfers data incorrectly is in use, the notice cannot be dismissed.
* Transfer is never interrupted by the version check; the notice is informational only.

= 1.4.0 =
* When the site is not connected, the Status tab now explains why and offers a way to reconnect.
* Submissions that could not be transferred (no phone or e-mail) and queue overflows are now counted and shown.
* Network and certificate errors are explained in plain language.
* Accessibility: names for switches and dropdowns, current tab indication, focus trap in the confirmation dialog.
* Secondary text contrast raised to WCAG AA.

= 1.3.0 =
* The admin interface was redesigned to match the visual language of the mez eSoft panel.
* The plugin is now called "mez eSoft Lead Submission".
* Disconnecting is confirmed in a designed dialog instead of a browser window.

= 1.2.0 =
* Field detection fixed: fields such as "date of birth" and "national ID" are no longer mistaken for a phone number.
* Submissions that could not be sent are now shown with their reason on the Status tab; nothing is lost silently.
* On multisite installations, removing the plugin now clears data for every site.

= 1.1.0 =
* Added Forminator support.

= 1.0.0 =
* First release.
