=== Inquadra Forms ===
Contributors: blackfoxmedia
Tags: forms, contact form, lead generation, form builder, gutenberg
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.7.3
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Build forms right in WordPress with inquadra.me Forms, add them with a block or a shortcode, and read entries and statistics from your dashboard.

== Description ==

Inquadra Forms connects your WordPress site to inquadra.me Forms, a hosted form service: contact requests, quotes, event sign-ups, customer feedback, job applications.

* **Build forms inside WordPress.** "Add New", "Templates" and "Edit" open the inquadra.me form builder right in your dashboard: fields, conditions, design, notifications. Every published change shows up on your site at once.
* **Add them anywhere.** The "Inquadra Form" block for the block editor, or the `[inquadra_form id="PUBLICID"]` shortcode for classic themes and page builders.
* **In the page or over it.** A form can sit in the content, or open over the page: in a popup, in a side panel or from a floating button in a corner. A popup can open on a click on a button, after some seconds, when the visitor is about to leave or after some scrolling.
* **Read your entries.** The "Entries" page lists what came in from this site, with answers and consents; "Dashboard" and "Analytics" show the same figures as the inquadra.me console.
* **Connect in one click.** "Connect to inquadra.me" signs you in (or creates a free account) and brings you back with the site connected. No key to copy.

Entries are not stored in the WordPress database: the inquadra.me cloud is their only home, so they are available from WordPress, from the inquadra.me console and from its integrations alike.

= Plans =

The plugin is free and works with the free Forms Free plan: one active form on one site. Forms Base (unlimited forms on one site) and Forms Pro (unlimited sites and client workspaces, for agencies) are paid yearly plans on inquadra.me. Plans are enforced by the service; the plugin has no locked features.

== External services ==

This plugin relies on inquadra.me Forms, a service run by inquadra.me (https://inquadra.me). It does not work without it.

Until an administrator connects the site, the plugin sends no request and loads no script. When they press "Connect to inquadra.me" (or "Activate" with a license key), the plugin contacts https://inquadra.me, or the server set in Inquadra Forms → Settings; if that address is invalid or does not respond, the plugin shows an error and tries no other server.

What is sent, and when:

* **Connecting the site:** the site address, a random installation ID, the plugin, WordPress and PHP versions, and either a one-time connection code or the license key.
* **Once a day while connected:** the same versions and the last error the plugin met, to keep the connection alive; once a week the connection token is renewed.
* **In the dashboard:** the list of forms, the entries that came from this site and their statistics are read from inquadra.me when you open those pages.
* **Building forms:** "Add New", "Templates" and "Edit" show inquadra.me pages in a frame. To open it, the WordPress server asks inquadra.me for a permission valid for one minute, naming the page and the WordPress user who opened it (username and email, kept in the inquadra.me activity log).
* **On your public pages:** only pages that contain a form load the script `https://inquadra.me/forms/embed.js` (or the configured server's), which shows the form in a frame. What visitors type into a form is sent to inquadra.me directly, never through WordPress.
* **Uploaded files:** when a form has an "Upload file" field set to WordPress, every five minutes (WP-Cron) and when you open an entry the plugin asks inquadra.me for the files that came in through this site, downloads them, saves them in wp-content/uploads/inquadra-forms/ and sends back each file's SHA-256 checksum, after which inquadra.me deletes its copy.

inquadra.me terms of service: https://inquadra.me/termini
inquadra.me privacy policy: https://inquadra.me/privacy

== Installation ==

1. Install the plugin from "Plugins → Add New" (or upload the ZIP) and activate it.
2. Open "Inquadra Forms → License" and press "Connect to inquadra.me".
3. Sign in to inquadra.me, or create a free account, and confirm: you come back to WordPress with the site connected.
4. Open "Inquadra Forms → Add New" to build a form, then add it to a page with the "Inquadra Form" block or the shortcode.

You can also connect with a license key from the inquadra.me console (Forms → Licenses and sites): paste it in the License page and press "Activate". If the status is "Awaiting confirmation", authorize the domain in the console and press "I have authorized the domain, verify".

== Frequently Asked Questions ==

= Where do I build forms? =

Right in WordPress: "Add New", "Templates" and "Edit" in "All forms" open the inquadra.me builder inside your dashboard, as the account that connected the site. The same builder is also available in the inquadra.me console.

= Is anything stored on my site? =

The connection: a token that is never sent to the browser, the installation ID and the address of the service. A license key, if you use one, is not stored. Entries stay on inquadra.me.

Files from "Upload file" fields set to WordPress are saved in wp-content/uploads/inquadra-forms/, one folder per file under a random name. The folder blocks direct access (.htaccess for Apache, web.config for IIS); on Nginx add a rule that denies /wp-content/uploads/inquadra-forms/. Administrators open the files from the entry page. Uninstalling the plugin keeps them.

= What happens if inquadra.me cannot be reached? =

Forms are loaded from the cloud: when one cannot be shown, visitors see "Form temporarily unavailable". The plugin keeps no entries locally.

= Does it work with Elementor, Divi or other page builders? =

Divi has its own "Inquadra Form" module: pick the form from a list and see it in the Visual Builder. In Elementor and other page builders, paste the shortcode into a text or shortcode element.

= How do I show a form in a popup? =

In the block, open "Display" in the sidebar and choose Popup, Side panel or Floating button, then when it opens. With the shortcode:

* `[inquadra_form id="PUBLICID" display="popup" label="Request a quote"]`: a button that opens the form in a popup;
* `[inquadra_form id="PUBLICID" display="slider" open="load" open_value="5"]`: a side panel that opens by itself after 5 seconds (`open` can also be `exit`, when the visitor is about to leave, or `scroll`, with `open_value` the percentage of the page);
* `[inquadra_form id="PUBLICID" display="popover" label="Write to us" color="#00805F"]`: a floating button in the bottom corner.

Add `close_after="3"` to close it by itself 3 seconds after the form is sent. An automatic opening happens at most once per page view.

= Can an agency manage its clients' sites? =

Yes, with Forms Pro: each client has its own workspace on inquadra.me, and the agency connects each client's WordPress site to it.

== Changelog ==

= 0.7.3 =
* Divi: a form created while the builder was open now appears in the Inquadra Form module's list after reloading the builder. Before, Divi could keep offering the old list.

= 0.7.2 =
* Forms can be duplicated and deleted from the Forms list in WordPress. A copy starts as a draft; deleting asks for confirmation and removes the form and its entries for good.

= 0.7.1 =
* Divi: the Inquadra Form module has the Border settings again (Design → Border), so its corners can be rounded and the form follows them.

= 0.7.0 =
* A form can open over the page: in a popup, in a side panel or from a floating button in a corner. In the block, choose it under "Display" in the sidebar; with the shortcode, use display="popup", "slider" or "popover". A popup or side panel opens on a click on a button, after some seconds, when the visitor is about to leave or after some scrolling, and can close by itself after the form is sent.
* Entries sent from a popup keep saying which page and post they came from, as inline forms do.

= 0.6.1 =
* Google Drive is connected from the "Upload file" field itself, in the builder: no need to leave WordPress for the console. The Integrations page lists it.

= 0.6.0 =
* "Upload file" fields: files visitors attach (CVs, photos, documents, up to 10 MB each) are saved on your site in a protected folder, wp-content/uploads/inquadra-forms/, which cannot be opened from the web. They are collected every five minutes and when you open the entry, and open from the entry page, for administrators only. A form can send them to the customer's Google Drive instead.
* Uninstalling the plugin keeps the uploaded files.

= 0.5.0 =
* Each entry opens on its own page, as in WPForms: the answers, the consents with the exact wording, where the person came from (page and its title, the WordPress post, the referring page, UTM and ad click ids such as gclid and fbclid) and the visitor (device, browser and system, language, time to fill in, and location or IP address when the form collects them).
* Previous and next entry, other entries from the same person, the timeline.
* Notes, signed with your WordPress name; print; one entry as CSV; mark as read or unread; send the notification emails again.

= 0.4.0 =
* Entries, redesigned: a chart of entries per day (7, 30 or 90 days) and every form with its totals; then, for each form, All / Unread / Starred / Spam, search by name or email, a date range, the form's first fields as columns and CSV export.
* Opening an entry marks it read; entries can be starred or marked as spam from WordPress.

= 0.3.1 =
* Divi: the module is fully supported in the Visual Builder, so Divi no longer warns about it, and its icon has the right size in the module list.

= 0.3.0 =
* Divi: an "Inquadra Form" module in the Divi Builder, with the form picked from a list and previewed live in the Visual Builder.

= 0.2.2 =
* A valid license key connects the site straight away, and the plugin takes you to the Dashboard to create your first form.
* The inquadra.me symbol in the page header and in the admin menu.
* Buttons keep their look on WordPress 6.7 and later.

= 0.2.1 =
* The admin screens take on the look of the inquadra.me console: mint canvas, cards with icons, large figures for the entry statistics.
* The Dashboard offers "Connect to inquadra.me" straight away on a site that is not connected yet.

= 0.2.0 =
* Build and edit forms inside WordPress with the inquadra.me builder.
* "Connect to inquadra.me": connect the site in one click, without copying a license key.
* Forms Free, Base and Pro plans.
* English interface, with Italian translation included.

= 0.1.0 =
* First release: license activation, block and shortcode, forms list, entries, statistics.
