=== IndiaTVDNA Smart Forms ===
Contributors: indiatvdna
Tags: contact forms, form builder, submissions, surveys, signatures
Requires at least: 6.2
Requires PHP: 7.4
Tested up to: 7.1
Stable tag: 1.0.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Create flexible, responsive forms with a visual builder, conditional and multi-step fields, private entries, exports and free email notifications.

== Description ==
IndiaTVDNA Smart Forms is a self-hosted form builder. Create forms, show and hide conditional fields, use multi-step layouts, and collect entries in your own WordPress database. The Free plugin includes real working features; there are no trial periods, entry quotas, or license checks.

Free features:
* Visual form builder, templates, shortcode and block.
* Rich field types, multi-step forms, conditions, calculations and basic quizzes.
* Private submissions and file uploads, CSV export and basic PDF entry reporting.
* Notification email via WordPress mail, with limited retry queue.
* Form import and export, QR sharing, form finder and quality checks.
* Basic analytics, settings, retention, optional encrypted drafts and security checks.
* Optional Cloudflare Turnstile verification; entirely disabled by default.

Optional separate Pro plugin:
Advanced business workflows, visual automation, branching graphs, advanced staff app presets, payment test integrations, Sheets/AI connections, performance analysis and A/B experiments are **not contained in this Free ZIP**. The original-style tool pages show working Free features alongside individually marked, read-only PRO controls; paid processing is not bundled. You can use Free without purchasing Pro. The plugin's own admin screens contain an optional upgrade link to https://indiatvdna.com/ . There are no automatic referrals, tracking requests, or admin-wide popups.

No payment functionality, webhook delivery, or Google integration is activated by the Free plugin. These features exist only in the separate Pro code base. Please back up your site before changing editions. Avoid enabling Free and Pro simultaneously.

== External services ==
* Cloudflare Turnstile is optional and off by default. When an administrator supplies Turnstile keys and enables it, the visitor's browser loads scripts from https://challenges.cloudflare.com/; the plugin sends the submitted token to https://challenges.cloudflare.com/turnstile/v0/siteverify to validate submissions. Cloudflare processes verification signals such as visitor device/browser information and IP metadata. Terms: https://www.cloudflare.com/website-terms/ ; Privacy: https://www.cloudflare.com/privacypolicy/ .
* Email notifications use WordPress wp_mail(), which may use the site's configured email delivery service. Submission data is sent to the configured notification address; delivery and privacy depend on the host or site administrator's mail provider.
* No third-party service is contacted merely by opening a plugin admin page. Clicking the optional Buy Pro Version link opens https://indiatvdna.com/ in a new tab.

== Source code and build ==
All PHP, JavaScript and CSS code is available in this WordPress.org ZIP under the GPL-compatible licenses described here and in LICENSE.txt. No obfuscated files, license keys, premium code, or closed-source compiler are required for the Free edition.

* assets/front.js: Browser runtime and human-readable JavaScript. The matching editable source is assets/source/front.source.js.
* assets/templates.js: Generated browser template data. Its editable, readable source is assets/source/templates.source.json (62 built-in form templates).
* Editable source files: assets/source/front.source.js and assets/source/templates.source.json (62 built-in starter templates).
* Rebuild from the extracted plugin root: `node assets/source/build-assets.js` (Node.js 18 or later; no npm install, third-party build dependencies or network requests).
* This generates assets/front.js as an unminified copy of front.source.js and assets/templates.js as browser-ready JSON from templates.source.json. No obfuscation or closed-source build tools are used.
* Optional checks: `node --check assets/front.js` and `node --check assets/templates.js`.
* Source attribution: QR library assets/qr-share.js derives from Kazuhiko Arase's qrcode-generator (MIT; see its header and upstream link below). The optional Cloudflare Turnstile API is not bundled and requires explicit administrator activation.
* The Free features remain accessible without an activation key, usage quota or paid license. Optional Pro processing code is not bundled.
* assets/pdf-unicode.js and assets/print-*.css: Human-readable source shipped directly without a build process.
* assets/qr-share.js: Bundled QR Code generator based on Kazuhiko Arase's qrcode-generator under the MIT License; upstream source: https://github.com/kazuhikoarase/qrcode-generator . See the header of that file for copyright attribution.

== Screenshots ==
1. Illustration of the All Forms dashboard showing published forms, shortcodes, entry counts and management actions.
2. Illustration of the visual form builder with templates, configurable field types and drag-to-reorder controls.
3. Illustrative public contact form that can be embedded using the included shortcode or WordPress block.
4. Illustration of multi-step form navigation and conditional fields that appear for selected answers.
5. Illustration of private submission entries with administrator filters, review statuses and entry management.
6. Illustration of notification settings, optional verification and the WordPress email retry queue.
7. Illustration of Free import/export tools, CSV entry exports and basic PDF entry reporting.
8. Illustration of Tools & Health including opt-in analytics, quality checks, QR sharing and other utilities.

== Installation ==
1. Back up the site and database.
2. In WordPress, go to Plugins > Add New > Upload Plugin, upload the ZIP and activate.
3. Under Smart Forms, create a form and save it.
4. Embed `[itdna_form id="123"]` (replace 123 with your form ID), or use the included block.
5. Test submission delivery, form permissions, and email on a staging site before using with real visitor data.

== Frequently Asked Questions ==
= Are there limits in Free? =
No artificial submission or form quotas are imposed by Free. Server resources and WordPress configuration still apply.

= Can I use the free features without Pro? =
Yes. The Free plugin runs independently and does not require a commercial key.

= Why do I see PRO badges? =
They identify optional features provided by a separate premium plugin. PRO labels are attached to individual advanced controls. Free controls on the same page continue to work.

= Will it send submission data to your site? =
No. The plugin does not transmit submission information to IndiaTVDNA. Optional Turnstile and email delivery are described above.

== Changelog ==
= 1.0.5 =
* Replace unsigned URL-driven Health Center test-email notices with short-lived, user-scoped flash messages set only after verified administrator requests.
* Replace URL-driven private-file migration results with per-user flash messages; retain existing nonce and capability checks.
* Audit form submissions, AJAX calls, exports and administrative actions for request authorization without changing the Free feature set.

= 1.0.4 =
* Load private entry print styles through the WordPress Styles API instead of hardcoded style elements.
* Replace inline JSON script elements with escaped data attributes for builder and Unicode PDF data.
* Move destructive-action confirmation handlers into an enqueued admin script.
* Publish readable JavaScript/template source and a reproducible, dependency-free build script.
* Audit request authorization and retain existing working Free functionality and original design.

= 1.0.0 =
* First WordPress.org Free release based on the independently tested self-hosted form core.
* Adopt modern Premium-inspired admin and public form styles.
* Keep the Pro-style sidebar and Tools & Health layout with 16 deep links; show in-place, read-only premium controls.
* Remove premium workflow, third-party payment, Sheets/AI and performance execution code from this distribution.
* Preserve standard form submissions, uploads, notifications, export and common quality tools.

= 1.0.1 =
* Match the Pro sidebar: retain registered 16 tool routes but hide duplicate submenu rows visually.
* Replace unrelated Pro upsell panels with layout-matched, read-only settings screens and clickable PRO badges.
* Keep upgrade link in header and avoid including premium business processing code.

= 1.0.2 =
* Restore the original single-click 16-card Tools layout: no entire Tool is marked PRO.
* Place PRO upgrade badges next to individually disabled premium controls only.
* Expose working Free email-job status and retry actions on Automation.
* Provide a permission-checked basic Form-to-App entry search and listing.
* Provide basic 30-day submission counts alongside Pro-only performance telemetry.
* Preserve Pro v1.0.15 Admin and Frontend CSS with only badge/link additions.
* Keep premium processing, payment, OAuth and remote service code out of the Free ZIP.

= 1.0.3 =
* Escape read-only Pro preview markup with restricted WordPress HTML allowlists.
* Add short-lived, user-scoped caching for custom-table admin queries.
* Update WordPress compatibility metadata; test live upgrade on staging before production.
* Preserve the v1.0.2 Free workflow, original interface and premium restrictions.
