=== PeleForms ===
Contributors: pelegsoft
Tags: forms, contact form, form builder, rtl, hebrew
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A beautifully designed, RTL-first form builder: drag & drop, AI form generation, multi-step forms, conditional logic, Israeli fields and payments.

== Description ==

PeleForms is a modern form builder for WordPress that treats Hebrew (RTL) and English (LTR) as equals.

* Drag & drop builder with a live, pixel-accurate canvas, and a one-click fix when fields side by side don't line up.
* Optional AI form generation: describe the form, or upload an existing one (PDF, image or Word) to get it back designed. Works with Google Gemini, Anthropic Claude or OpenAI ChatGPT using your own API key.
* Layout widths (columns), multi-step wizards, one-question-per-screen mode, review step, conditional logic - all included.
* 36 templates with design themes and color palettes.
* Israeli fields: ID number with check-digit validation, Israeli phone numbers, localities, bank account with Masav check digits, Hebrew date.
* Calculations, Likert, NPS, repeater, file uploads (protected storage, automatic image compression) and digital signature.
* Payments: Stripe, PayPal, Cardcom, Grow, PayPlus and Tranzila.
* Entries management with search, sorting, stars, spam folder, email an entry and Excel-friendly CSV export (Hebrew-safe).
* A PeleForms panel on the WordPress dashboard (new entries, daily numbers, busiest forms), a toolbar counter and a short message when a new entry arrives.
* Interface in Hebrew or English for each user, independent of the WordPress language.
* Beautiful, responsive HTML email notifications with dynamic tags and conditional routing.
* Spam protection without annoying users: honeypot, time trap, JS token, rate limiting, optional Cloudflare Turnstile / reCAPTCHA v3.
* Designed to help sites meet WCAG 2.1 AA and Israeli Standard 5568: keyboard operation of the built-in fields, screen-reader markup and AA contrast in the built-in themes. The site owner remains responsible for the accessibility of the whole site.
* Update check: a "Check for updates" button and an optional weekly check that show a new version, what changed and where to download it. Nothing is installed automatically.
* Privacy-minded: entries in the WordPress personal data export and erasure tools, a suggested privacy policy text, optional IP storage, automatic data retention cleanup, locally bundled fonts.

Embed forms with the "Pele Form" block or the `[pele_form id="123"]` shortcode.

== Installation ==

1. Upload the `pele-forms` folder to `/wp-content/plugins/`.
2. Activate the plugin through the "Plugins" screen.
3. Go to PeleForms → Add New.

== Frequently Asked Questions ==

= Where are uploaded files stored? =

In `wp-content/uploads/pele-forms/`, inside randomly named folders. Direct access is denied on Apache/IIS; files are served only to logged-in users with access to entries. On Nginx, add a `location ^~ /wp-content/uploads/pele-forms/ { deny all; }` rule.

= Is my site behind Cloudflare or a proxy? =

Cloudflare is detected automatically (Settings > Spam protection > Visitor IP source). Behind another reverse proxy, choose the header it sets there, or use the `pele_forms_client_ip` filter.

= Do I need an AI account? =

No. Everything in PeleForms works without AI. To generate forms with AI, connect your own API key from Google (Gemini), Anthropic (Claude) or OpenAI (ChatGPT) in PeleForms > Settings > AI; each one has a test button and a link to the provider's key page. The provider bills its usage to the key owner, and PeleForms adds no fee.

= What happens to a file I upload to rebuild a form? =

It is sent once, only to the AI provider you chose, to build that form. It is never saved on your site. See "External services" below.

= How do I answer a request to export or delete someone's data? =

Use Tools > Export Personal Data or Tools > Erase Personal Data in WordPress. PeleForms adds the entries in which that address was given in an email field, or that the registered user with that address sent. Erasing deletes those entries with their uploaded files. PeleForms also suggests a paragraph for your privacy policy in Settings > Privacy.

== External services ==

PeleForms works without any external service. The services below are contacted only when the site owner turns them on (payments, anti-spam) or when an administrator asks for it (AI form generation, data lists). PeleForms never sends data to its authors. Fonts and data files are bundled with the plugin.

= Payment gateways: Stripe, PayPal, Cardcom, Grow, PayPlus, Tranzila =

Used only on forms where the site owner turned payments on and connected a gateway with their own account and keys. When a visitor submits such a form, the site sends the chosen gateway the amount and currency, a short description (the form name and the items), the return and cancel addresses and an internal payment reference. Grow, PayPlus and Tranzila also receive the payer's name, email and phone, and Stripe the payer's email, when the form asks for them. The visitor then pays on the gateway's own secure page, so card details never reach the site. The gateway reports the result back to the site (webhook or notify call), and the site may ask the gateway's API to confirm the payment status. For PayPal, the site's credentials are exchanged for an access token.

* Stripe (api.stripe.com): [Terms](https://stripe.com/legal/ssa), [Privacy policy](https://stripe.com/privacy)
* PayPal (api-m.paypal.com): [User agreement](https://www.paypal.com/il/legalhub/paypal/useragreement-full), [Privacy statement](https://www.paypal.com/il/legalhub/paypal/privacy-full)
* Cardcom (secure.cardcom.solutions): [Privacy policy](https://www.cardcom.solutions/privacy-policy/)
* Grow (secure.meshulam.co.il): [Terms of use](https://grow.business/terms-of-use-versions), [Privacy policy](https://grow.business/privacy-policy/)
* PayPlus (restapi.payplus.co.il): [Terms of service](https://www.payplus.co.il/privacy), [Data protection policy](https://www.payplus.co.il/data-security)
* Tranzila (directng.tranzila.com, api.tranzila.com): [Privacy policy](https://www.tranzila.com/privacy.html)

= Cloudflare Turnstile =

Used only when the site owner chooses Turnstile in PeleForms > Settings > Spam protection and enters their own keys. On pages with a form, the visitor's browser loads the Turnstile script from challenges.cloudflare.com, which checks browser signals to tell people from bots. When the form is submitted, the site sends the resulting token, its secret key and the visitor's IP address to Cloudflare to verify it. [Terms](https://www.cloudflare.com/website-terms/), [Turnstile privacy policy](https://www.cloudflare.com/turnstile-privacy-policy/)

= Google reCAPTCHA v3 =

Used only when the site owner chooses reCAPTCHA in PeleForms > Settings > Spam protection and enters their own keys. On pages with a form, the visitor's browser loads the reCAPTCHA script from www.google.com, which checks browser signals to tell people from bots. When the form is submitted, the site sends the resulting token, its secret key and the visitor's IP address to Google to verify it. [Terms of service](https://policies.google.com/terms), [Privacy policy](https://policies.google.com/privacy)

= AI form generation: Anthropic (Claude), OpenAI (ChatGPT), Google (Gemini) =

Used only when an administrator connects their own API key in PeleForms > Settings > AI and then uses "Generate with AI" on the new form screen. Testing a key asks the provider for the list of models the key can use. Generating a form sends the provider the description the administrator typed and/or an existing form file they attach (a PDF or an image as it is, or the text of a Word file), the chosen form language and fixed building instructions; the answer is turned into a form that the administrator reviews in the builder. An attached file is used for that one request only and is never stored on the site. No entries, visitor data or other site content are sent. Each provider bills the generated forms to the key owner's account.

* Anthropic (api.anthropic.com): [Commercial terms](https://www.anthropic.com/legal/commercial-terms), [Privacy policy](https://www.anthropic.com/legal/privacy)
* OpenAI (api.openai.com): [Terms of use](https://openai.com/policies/terms-of-use/), [Privacy policy](https://openai.com/policies/privacy-policy/)
* Google Gemini API (generativelanguage.googleapis.com): [Gemini API terms](https://ai.google.dev/gemini-api/terms), [Privacy policy](https://policies.google.com/privacy)

= data.gov.il (Israeli government open data) =

Used only when an administrator clicks "Update now" in PeleForms > Settings > Data lists, or turns on the monthly automatic check there (off by default). The site downloads the official lists of bank branches (Bank of Israel) and of localities (Population and Immigration Authority) from the data.gov.il API. No personal data is sent. [Terms of use](https://data.gov.il/terms-of-use)

= PeleForms update check (pelegsoft.com) =

Used only when an administrator clicks "Check for updates" (on the About screen or in the PeleForms dashboard panel), or turns on the weekly check in PeleForms > Settings > General > Updates (off by default). The site reads a small public file, https://pelegsoft.com/apps/wp/peleforms/update.json, that describes the latest PeleForms release. The request sends no site address, no personal data and no cookies; the only detail it carries is the installed PeleForms version, in the user agent. Nothing is downloaded or installed: the administrator sees the new version, what changed and a link to the download page. [Terms](https://pelegsoft.com/terms), [Privacy policy](https://pelegsoft.com/privacy)

== Changelog ==

= 1.3.0 =
* Update check: a "Check for updates" button on the About screen and in the PeleForms dashboard panel, and an optional weekly check (Settings > General > Updates, off by default). It shows the new version, what changed and a link to download it from pelegsoft.com. Nothing is downloaded or installed automatically.

= 1.2.1 =
* Security: a Grow payment is marked paid only after Grow confirms the transaction and its amount.
* Security: PayPal events are matched by their order; a partial refund no longer marks a payment refunded. Cardcom and PayPlus results without an amount stay pending.
* Security: a payable calculation can no longer lower the total, and a hidden field with a fixed value keeps that value.
* Security: very large images are never decoded on the server, and upload folders left behind by an interrupted submission are cleaned up daily.
* Security: the rate limit is counted before files are processed and cannot be bypassed with parallel requests or many IPv6 addresses; the entry limit holds under parallel submissions.
* Spam is no longer stored for forms that keep no entries.
* Builder: a warning before attaching files to an email that goes to an address typed into the form.
* Entries list: choice answers show their label (as the visitor saw them) instead of the stored value, and sort the same way.

= 1.2.0 =
* Generate a form with AI: describe it in Hebrew or English, and Gemini, Claude or ChatGPT builds it with your own API key (Settings > AI, with a test button and a link to each provider's key page). Generated forms follow the layout and design rules.
* Rebuild an existing form with AI: upload a PDF, an image or a Word file (.docx or the older .doc) and get a designed PeleForms form, with the changes you ask for applied first. Uploaded files are never stored.
* Builder: a notice when fields side by side don't line up or a row is left half empty, with a one-click Align that you can undo. The built-in templates were lined up the same way.
* Privacy: form entries in the WordPress Export and Erase Personal Data tools, and a suggested privacy policy text.
* Dashboard: a PeleForms panel (shown or hidden in Screen Options) with new entries, today, the last 7 and 30 days, a 14-day chart, the latest entries and the busiest forms.
* New entry alerts: a counter in the WordPress toolbar with the newest entries, and a short message on admin screens when an entry arrives, without reloading (Settings > General).
* Forms list: rows per page (All, 20, 50 or 100, with 50 by default) and an Empty trash button.
* The new form screen remembers the language you picked.
* New logo.
* Clearer default texts, including the notification subject "{form_name}: new submission".
* Faster editing in the builder, and the drop target follows the pointer when sorting fields.
* WordPress and other plugins' notices show again on PeleForms screens.
* Fix: a payment that could not start no longer leaves a duplicate entry, and out-of-range NPS or donation values are rejected.
* Fix: two copies of the same form on one page get unique landmark names, and the one-question-per-screen keyboard hint no longer shifts the layout.

= 1.1.0 =
* Interface language per user: Hebrew, English or as in WordPress, with the matching screen direction.
* Sortable forms and entries tables, rows per page, and arrow keys to move between entries.
* Email an entry from the entry screen, with attachments and an activity log.
* Template designs and 10 color palettes, in the gallery and in the builder.
* Date formats (numeric, worded, month/year, year), 12/24-hour time with seconds, and a direction setting for every field.
* Redesigned dropdowns everywhere, with search in long lists.
* Consent links can open in a window on the page, with print and close.
* Bank list from the official Bank of Israel and Masav sources, Masav check digits, and a Data lists screen to update, hide, rename and add items.
* Accessibility: keyboard operation of the built-in fields, visible focus, AA contrast in the built-in themes.
* CSV export: dates as dd/mm/yyyy and times on the 24-hour clock.
* About screen with version, build and system details.

= 1.0.0 =
* First release.
