=== Legba Form ===
Contributors: pierreht
Tags: form builder, contact form, multi-step form, conditional logic, survey
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Modern drag-and-drop form builder: conditional logic, multi-step forms, file uploads, entries dashboard, designed emails and spam protection.

== Description ==

Legba Form lets anyone build beautiful, accessible forms in minutes, without code. Everything is included in the free version: no artificial limits on forms, fields or entries.

**Visual builder**

* Drag fields from the palette, drop them where you want, reorder them, duplicate them.
* What you see in the builder is the real form: same design, same widths, same choices.
* Undo / redo, keyboard shortcuts (Ctrl+S, Ctrl+Z, Ctrl+D, Delete, Alt+arrows) and an unsaved-changes guard.
* Live preview on computer, tablet and phone sizes, even for draft forms.
* 11 ready-made templates: contact, event registration, volunteer application (multi-step), membership, satisfaction survey, incident report, job application, appointment request, newsletter, feedback.
* Import and export forms as JSON files to copy them between sites.

**23 field types**

Single line, paragraph, email, phone, number, dropdown, multiple choice, checkboxes, name, address, date, time, website, file upload (drag and drop, several files), star rating, opinion scale (0–10, NPS), slider, consent, hidden field, section title, text/HTML block, divider and page break.

**Advanced logic and validation**

* Conditional logic on fields, on whole steps and on emails: show or hide when all or any of the conditions are met (is, is not, contains, starts with, ends with, greater than, less than, empty, filled). Rules cascade: a field hidden by another one counts as empty.
* Multi-step forms with a progress bar or numbered steps; hidden steps are skipped automatically.
* Live validation while typing, checked again on the server.
* Input masks: phone (North America or international), Canadian postal code, US ZIP code, social insurance number or your own pattern.
* Minimum and maximum characters with a counter, minimum and maximum choices, number ranges, earliest and latest dates (fixed or relative: today, +7 days…), weekdays only, regular expressions, custom error messages.
* Choices with separate values, prices and images, "Other" choice with a text box, shuffled choices, card layout, 2 or 3 columns.
* Dynamic default values from the address ({get:param}), the logged-in user ({user:email}) or the page.

**Entries**

* Entries dashboard with search, date filters, unread / starred / spam / trash views and bulk actions.
* Entry page with all answers, private team notes, uploaded files (private, team-only downloads), previous / next navigation and print.
* CSV and Excel (.xlsx) exports (accents kept, spreadsheet-formula injection blocked).
* Campaign tracking: the source of each entry (utm_source, utm_campaign… and the referring site) is saved with the answers, shown on the entry page and usable in emails ({utm:source}).
* Statistics per form: views, starts, entries and conversion rate, with a 30-day chart.

**Emails**

* As many emails per form as you want: to your team, a confirmation to the person, conditional emails.
* Merge tags: {field:key}, {all_fields}, {form_title}, {entry_id}, {date}, {site_name}, {page_url}, {entry_url}…
* Designed HTML emails with your logo, reply-to the person who answered, uploaded files attached.

**Design**

* Four styles (modern, minimal, rounded, classic), your colors, font, corner rounding, field size and button style.
* Labels above, floating inside or left of the fields; half, third, quarter and two-thirds widths.
* Light or dark scheme, smooth animations that respect "reduce motion".
* Forms adapt to the width they are given (sidebar, column or phone), not only to the screen.

**Spam protection without puzzles**

Invisible honeypot, minimum filling time, signed timestamp, rate limit per visitor, blocked words and domains and Akismet (when active).

**Privacy**

* IP addresses are not stored by default.
* Automatic deletion after a delay (global or per form), WordPress personal data export and erase tools, suggested privacy policy text.
* Uploaded files are stored outside the media library in a protected folder.

**Accessible and fast**

Real labels, fieldsets and legends, error messages linked to their field, keyboard navigation, screen reader announcements. Scripts and styles load only on pages that show a form; no jQuery on the front end.

**Use it anywhere**

Shortcode `[legba_form id="12"]`, the "Legba Form" block, or `do_shortcode()` in a theme.

**Legba Form Pro** adds:

* Payments and calculations: formulas, payment totals, donation amounts and coupons, Stripe, PayPal or Interac e-Transfer.
* More fields: signatures, Likert matrices, rankings, appointment booking with free time slots and a calendar file (.ics), repeaters ("add a participant").
* Conversational forms (one question at a time), quizzes with scores and right answers, conditional text in confirmations and emails ({if:…}).
* Save and resume links, partial entries, limited places per choice, choices filled from your content or from Legba Event, unique answers, access codes, Cloudflare Turnstile check.
* Workflow: email confirmation (double opt-in), accept or refuse each entry with an email, assignment to a team member, follow-up emails, daily or weekly summary email.
* Reports: charts of the answers to every question, sources of visitors, drop-off analysis, report export.
* Connections: Google Sheets, Mailchimp, Brevo, HubSpot, Slack, Microsoft Teams, text messages with Twilio, signed webhooks, WordPress user accounts, posts created from entries.
* Entry editing, PDF of entries, your own form templates, per-form colors and CSS.

== External services ==

Legba Form works without any outside service. One optional service is used only when you turn it on:

= Akismet (optional) =

If the Akismet plugin is active and connected, and "Check with Akismet" is on (Settings → Spam), the answers of each entry (name, email and text), the visitor's IP address, browser and referring page are sent to Akismet to detect spam. Nothing is sent when Akismet is not active.

* Terms of use: https://akismet.com/tos/
* Privacy policy: https://automattic.com/privacy/

== Installation ==

1. Install and activate the plugin.
2. Go to Legba Form → New form and choose a template (or start blank).
3. Drag fields, set your emails in the "Emails" tab, then save.
4. Copy the shortcode from the "Share" tab, or add the "Legba Form" block to a page.

== Frequently Asked Questions ==

= Are the number of forms or entries limited? =

No. Create as many forms and receive as many entries as you want.

= Where are the uploaded files stored? =

In wp-content/uploads/legba-form, with random file names and a protection against direct access. Only people who manage forms can download them from the entry page.

= My emails are not received. =

WordPress sends emails with the server's mail function, which is often blocked or marked as spam. Use an address of your own domain in Settings → Emails, and an SMTP plugin.

= Can I translate the forms? =

Every label is yours to write. The plugin itself is translated in French (France and Canada) and ready for other languages.

= Is it compatible with page builders? =

Yes: the shortcode works in any builder, widget or theme template.

== Screenshots ==

1. The drag-and-drop builder with the settings of a field.
2. Conditional logic: show or hide a field depending on other answers.
3. Ready-made templates to start a form.
4. A multi-step form with numbered steps.
5. Live validation with clear error messages.
6. The forms dashboard with statistics.
7. Entries of a form, with CSV and Excel exports.
8. An entry: answers, details and team notes.
9. Emails with merge tags.

== Changelog ==

= 1.0.3 =
* The plugin is now published under the name Legba Father (https://getlegba.com). No functional change.

= 1.0.2 =
* Security: every form now carries a WordPress nonce that is checked when the form is sent (refreshed automatically on cached pages).

= 1.0.1 =
* Pro: the "Activate the license" link now opens the license window from any admin page.

= 1.0.0 =
* First version.
