=== FormEmpire ===
Contributors: dieer
Tags: form, quote request, woocommerce, booking, hungarian
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.3.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed FormEmpire forms (quote requests, orders with price calculation, bookings) in WordPress and WooCommerce.

== Description ==

[FormEmpire](https://formempire.hu) helps you get more quote requests and orders from your website with online forms: quote requests with an expected price range and itemised PDF quotes, orders with price calculation, a booking calendar, file uploads, e-signature, and connections to Make, Zapier, n8n, Google Sheets, MailerLite, SalesAutopilot and Mailchimp. The interface and the ready-made forms are in Hungarian.

This plugin places your FormEmpire forms in WordPress:

* **Block** – "FormEmpire form" in the block editor: inline, or a button that opens the form in a popup or side panel.
* **Shortcode** – `[formempire id="FORMID"]` anywhere, including page builders.
* **Floating button** – a site-wide button whose label, colour and position you set in FormEmpire.
* **WooCommerce** – a "Request a quote" button on product pages; the form gets the product name, SKU, category, price and link, and the logged-in customer's name, e-mail and phone. Show it on every product, only on products that cannot be bought, or only when out of stock. A survey on the order-received page with the order data. Classic and block themes alike.

The forms themselves live at formempire.hu; submissions are handled there. A FormEmpire account is required (free plan available).

== Third-party service ==

This plugin embeds forms from FormEmpire (https://formempire.hu), operated by the plugin author. Pages that contain a FormEmpire form, button or the floating button load `https://formempire.hu/embed.js` and show the form in an iframe from `https://formempire.hu`. Data typed into a form is sent to FormEmpire. If you set an API key, this site's server calls `https://formempire.hu/api/v1` to list your forms by name; the key is stored in this site's options and never sent to the browser.

Terms: https://formempire.hu/aszf · Privacy: https://formempire.hu/adatkezeles

== Installation ==

1. Install and activate the plugin.
2. Build a form at formempire.hu and copy its link (https://formempire.hu/f/…).
3. Add the "FormEmpire form" block to a page and paste the link, or use `[formempire id="…"]`.
4. Optional: Settings → FormEmpire for the floating button, the WooCommerce quote button and an API key.

== Frequently Asked Questions ==

= Do I need a paid FormEmpire plan? =
No. The free plan works with this plugin, up to 50 submissions a month. File uploads and the integrations are paid features of FormEmpire.

= Does it work with Elementor, Divi or other page builders? =
Yes, use the shortcode `[formempire id="FORMID"]` in any text/HTML widget.

= Which fields get prefilled on WooCommerce product pages? =
termek (product name), cikkszam (SKU), kategoria, ar (price), termek_link, and for logged-in customers nev, email, telefon, ceg. Give your form fields these keys (field settings → key) to receive them.

= Is the form GDPR compliant? =
Data is stored by FormEmpire on EU servers (Germany). A data-processing agreement is available on request.

== Changelog ==

= 1.3.1 =
* Description and settings text updated: online payment and invoicing are not available in FormEmpire yet, so they are no longer mentioned.

= 1.3.0 =
* Block themes: the quote button is placed next to the Add to Cart block when the product template does not run the classic hooks; the order-received form works in the block Order Confirmation template ("Additional information" block).
* The floating button's script is enqueued through the WordPress script API.
* Security: order data (name, e-mail, phone, items) is handed to the form only when WooCommerce itself shows the order – valid order key, logged-in customer or verified e-mail – never from the link alone; the page context is encoded safely for the script tag.

= 1.2.0 =
* WooCommerce: a form on the order-received (thank-you) page with the order number, total, products, shipping and payment method handed over as hidden fields; the billing name, e-mail and phone prefilled for guests too.

= 1.1.0 =
* Product context: price, unit, brand, image and link from the product page; HPOS compatibility declared.

= 1.0.0 =
* First release: block, shortcode, floating button, WooCommerce quote button, optional API key for listing forms.
