=== Lead Capture Chat ===
Contributors: nitspatel
Tags: lead generation, chat widget, contact form, leads, floating widget, lead capture, visitor leads, lead form, lead chatbot
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 2.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A beautiful floating chat widget for WordPress. Collect visitor details, manage leads in your dashboard, and export to CSV - no coding needed.

== Description ==

**Lead Capture Chat** adds a polished, animated floating chat widget to your WordPress site that captures visitor name, email, phone, and message — then stores every lead directly in your WordPress admin.

No third-party services. No monthly fees. No data leaves your server.

> 🚀 **Want more power?** Upgrade to **[WP LeadChat Pro](https://checkout.freemius.com/plugin/29207/plan/48049/)** for unlimited leads, custom fields, email notifications, spam protection, and full appearance control.
---

= ✅ Free Features =

* **Floating chat widget** — animated slide-up popup triggered by a fixed button in the corner of every page
* **Inline shortcode** — embed the form anywhere with `[npleadchat]`
* **Leads dashboard** — view, search, sort, and manage all leads from WP Admin → Lead Capture Chat
* **Bulk actions** — select and delete multiple leads at once
* **Search & sort** — find leads by name, email, phone, or message; sort by name or date
* **Client-side validation** — instant feedback before form submission
* **CSV Export -export leads by clicking on the export CSV button
* **REST API powered** — uses the WordPress REST API with nonce verification
* **GDPR-friendly** — all data stored locally in your own database, no external services

---

= ⚡ Upgrade to WP LeadChat Pro =

**[WP LeadChat Pro](https://checkout.freemius.com/plugin/29207/plan/48049/)** is the premium version of this plugin, packed with powerful features that turn your chat widget into a complete lead generation system.

**Lead Capture**
* ✅ **Unlimited leads** — no monthly cap, capture as many as your site gets
* ✅ **Custom Field Builder** — add unlimited extra fields: Text, Email, Phone, Textarea, Dropdown, Checkbox
* ✅ **Drag-and-drop field reordering** — control the exact order in which fields appear to visitors
* ✅ **Live admin preview** — see your widget update in real time as you configure settings

**Lead Management**
* ✅ **Lead detail modal** — expand any row to see all submitted values at a glance

**Email Notifications**
* ✅ **Admin notification** — get an email the moment a new lead submits
* ✅ **Lead auto-reply** — send an instant thank-you email to the visitor automatically
* ✅ **Template tags** — personalise emails with `{name}`, `{email}`, `{message}`, `{all_fields}`, and more
* ✅ **Custom sender identity** — set your own From name and From email

**Spam Protection**
* ✅ **Honeypot field** — silently blocks bots with zero friction for real visitors
* ✅ **Google reCAPTCHA v3** — invisible, score-based spam protection

**Appearance & Customisation**
* ✅ **Colour picker** — set primary and accent colours with live preview
* ✅ **Widget position** — choose left or right corner placement
* ✅ **Widget width** — adjust between 280 px and 600 px
* ✅ **Custom profile image** — upload your own avatar or logo to the chat header
* ✅ **Fully editable** — chat title, subtitle, welcome message, and button text

**[→ Get WP LeadChat Pro](https://checkout.freemius.com/plugin/29207/plan/48049/)**

Plans start from just **$3/month** · 7-day free trial · 12-day money-back guarantee · 1 site, 5 sites, or unlimited

---

= How It Works =

1. A visitor clicks the floating chat button in the corner of your site
2. A smooth animated popup appears with a contact form
3. The visitor fills in their details and clicks Send
4. The lead is saved to your WordPress database instantly
5. You see the new lead in **WP Admin → Lead Capture Chat**

= Shortcode =

Use `[npleadchat]` to embed the form inline in any page, post, or widget area.

= Privacy & GDPR =

This plugin stores lead data only in your own WordPress database. It makes no external HTTP requests and loads no resources from third-party servers. Font files are bundled locally.

== Installation ==

= Automatic installation =

1. Log in to your WordPress admin and go to **Plugins → Add New**
2. Search for **Lead Capture Chat**
3. Click **Install Now**, then **Activate**

= Manual installation =

1. Download the plugin ZIP file
2. Go to **Plugins → Add New → Upload Plugin**
3. Choose the ZIP file and click **Install Now**
4. Click **Activate Plugin**

= After activation =

* The floating chat widget appears automatically on all pages — no configuration needed
* Go to **WP Admin → Lead Capture Chat** to view collected leads
* Use the `[npleadchat]` shortcode to embed the form inline on any page
* Want more features? [Upgrade to WP LeadChat Pro](https://checkout.freemius.com/plugin/29207/plan/48049/)

== Frequently Asked Questions ==

= Does this plugin work with any WordPress theme? =

Yes. The widget uses fixed positioning and high z-index values, so it works with any theme without conflicts, including block themes, Elementor, Divi, and WooCommerce stores.

= Where are leads stored? =

All leads are stored in a custom database table (`wp_npleadchat_leads`) in your own WordPress database. No data is sent to any external server.

= How do I view my leads? =

Go to **WP Admin → Lead Capture Chat**. You will see a table of all submitted leads with search, sort, and bulk-delete options.

= How do I export leads? =

CSV export is available in **[WP LeadChat Pro](https://checkout.freemius.com/plugin/29207/plan/48049/)**. Upgrade to download all your leads as a `.csv` spreadsheet with one click, including any custom fields.

= Can I embed the form in a page instead of using the floating widget? =

Yes. Add the shortcode `[npleadchat]` to any page, post, or widget area.

= Can I change the colours, position, or appearance of the widget? =

Full appearance control — colour picker, widget position (left/right), widget width, custom avatar, and editable text — is available in **[WP LeadChat Pro](https://checkout.freemius.com/plugin/29207/plan/48049/)**. On the free version you can override basic styles using your theme's custom CSS.

= Can I add extra fields to the form? =

Yes — with **[WP LeadChat Pro](https://checkout.freemius.com/plugin/29207/plan/48049/)**. The Custom Field Builder lets you add unlimited fields: Text, Email, Phone, Textarea, Dropdown, and Checkbox. You can drag to reorder them and set which are required.

= Does this plugin send email notifications when a lead submits? =

Email notifications (admin alert + lead auto-reply with configurable subject and body) are a **[WP LeadChat Pro](https://checkout.freemius.com/plugin/29207/plan/48049/)** feature.

= Is there spam protection? =

Honeypot and Google reCAPTCHA v3 spam protection are available in **[WP LeadChat Pro](https://checkout.freemius.com/plugin/29207/plan/48049/)**.

= What is WP LeadChat Pro? =

**WP LeadChat Pro** is the premium version of this plugin. It adds unlimited leads, custom field builder, CSV export, email notifications, spam protection (honeypot + reCAPTCHA v3), full appearance customisation, and more. Plans start from $3/month with a 7-day free trial and 12-day money-back guarantee. [Learn more and upgrade →](https://checkout.freemius.com/plugin/29207/plan/48049/)

= How do I upgrade to WP LeadChat Pro? =

Visit the [WP LeadChat Pro pricing page](https://checkout.freemius.com/plugin/29207/plan/48049/), choose your plan (1 site, 5 sites, or unlimited), and complete the checkout. You will receive a download link by email. Install WP LeadChat Pro on your site — it automatically imports all your existing leads, so nothing is lost.

= Will my existing leads carry over if I upgrade to Pro? =

Yes. WP LeadChat Pro detects and imports all leads from this plugin automatically on first activation. Export a CSV backup first just to be safe, then deactivate and delete Lead Capture Chat before installing the Pro version.

= Does this plugin slow down my site? =

No. The CSS (~14 KB) and JS (~4 KB) are only loaded when needed, and the font files (~14 KB each) are bundled locally — no external requests.

= Is this plugin GDPR compliant? =

The plugin itself makes no external requests and stores data only in your own database. Whether your overall data collection practices are GDPR compliant depends on how you use the collected lead data. We recommend adding a privacy notice to your site explaining how you handle visitor data.

= What happens to the database table if I uninstall the plugin? =

The plugin includes an `uninstall.php` file that removes the custom database table when the plugin is deleted from the Plugins screen.

== Screenshots ==

1. The floating chat widget opens on a page — gradient header, avatar, modern form fields, and a success message
2. Leads dashboard — view, search, sort, and bulk-delete all captured leads in WP Admin
3. **Settings + live preview(PRO)** — the full settings panel showing colour pickers, avatar upload, field toggles, and the live preview sidebar updating in real time as you type
4. **Custom Field Builder (Pro)** — drag-and-drop field list with custom field types (Text, Dropdown, Checkbox and more), reorderable rows, and required field toggles — unlocked with a Pro licence

== Changelog ==

= 2.2.0 =
* Added: Pro upsell section in plugin description — links to WP LeadChat Pro for unlimited leads, custom fields, email notifications, CSV export, and spam protection
* Added: New FAQ entries explaining Pro features and how to upgrade
* Fixed: Admin menu references updated from old plugin name to Lead Capture Chat
* Fixed: "Can I change colours?" FAQ updated to correctly point to Pro instead of "planned for future release"

= 2.1.1 =
* Changed the description of the plugin
* Removed some unwanted details

= 2.1.0 =
* Plugin renamed from NP Lead Chatbot to Lead Capture Chat for clarity and better searchability
* Updated banner and plugin icon assets
* No database or functionality changes — safe to upgrade

= 2.0.0 =
* Complete UI redesign — gradient header, DM Sans font (bundled locally), animated popup, modern inputs with focus states
* Added floating button toggle animation (chat icon ↔ close icon)
* Added slide-up open / scale-down close popup animation
* Added loading spinner on submit button during form submission
* Added styled success and error response messages with icons
* Added Escape key and outside-click to close popup
* Added ARIA labels and roles for accessibility
* Replaced Google Fonts external request with locally bundled woff2 font files
* Refactored frontend PHP — shared form field helper, proper label elements, autocomplete attributes
* Improved inline validation — error state clears as user types
* Added `[npleadchat]` inline embed with its own gradient header

= 1.2.0 =
* Added Export Leads (CSV) feature in the admin panel
* Improved admin UI
* Minor performance improvements

= 1.1.0 =
* Added bulk actions support in admin listing
* Added search functionality in admin listing
* Added column sorting in admin listing
* Improved UI and performance

= 1.0.0 =
* Initial release with lead capture form and admin dashboard

== Upgrade Notice ==

= 2.2.0 =
Adds Pro upsell information and fixes admin menu name references. Safe to upgrade — no database or functionality changes.

= 2.1.1 =
Description update only. Safe to upgrade.

= 2.1.0 =
Plugin renamed to Lead Capture Chat. No database or functionality changes — safe to upgrade.

= 2.0.0 =
Major UI redesign. The floating widget and inline shortcode form now have a professional gradient header, smooth animations, and modern input styling. No database changes — safe to upgrade.

= 1.2.0 =
Adds CSV export for leads. Safe to upgrade.
