=== FieldLoops - Repeater Field for Gravity Forms ===
Contributors: peterkurucz, kuruczp
Tags: gravity forms, repeater, repeatable fields, dynamic rows, field groups
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 8.0
Stable tag: 1.3.37
License: GPL-3.0
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Add repeatable field groups to Gravity Forms — let users add and remove rows of fields on the frontend, no code required.

== Description ==

**FieldLoops Repeater** turns any block of Gravity Forms fields into a repeatable group. Visitors can add or remove rows on the frontend; you get clean, structured data in every entry, email notification, and merge tag.

[Try the live demo](https://fieldloops.com/demo/) to see it in action.

It works with **every standard Gravity Forms field type** — Text, Email, Number, Phone, Date, Time, Address, Name, File Upload, Drop Down, Radio Buttons, Checkboxes, Section Break, and more — and respects min/max row limits, validation rules, and Gravity Forms' multi-page navigation.

**Common use cases**

* Order forms with line items (product, quantity, price per row)
* Event registrations with multiple attendees
* Job applications with previous-employer history
* Real estate listings with multiple units
* Travel bookings with passenger lists
* Surveys with repeating answer blocks

**Why a Repeater field?**

Without one, you have to add a fixed number of duplicate fields to your form ("Attendee 1 Name", "Attendee 2 Name", …) and hope it's enough. With FieldLoops, you define a single block of fields once and visitors decide how many rows they need — within limits you set.

**Free features**

* Multiple repeater groups per form
* Configurable min/max rows per group (up to 50)
* Custom Add and Remove button labels
* All standard Gravity Forms field types supported, including File Upload (single and multi-file)
* Server-side validation for every row, including required fields and custom rules
* Sticky rows on validation failure — user input is preserved when validation errors occur
* Multi-page form support (one group per page)
* Full entry detail display in the WordPress admin
* Merge tags and email notifications include every row
* Translation-ready (text domain `fieldloops-repeater-field-for-gravity-forms`)
* Works with Gravity Forms 2.5+ and the legacy and modern form themes

**Pro features**

A Pro version adds advanced functionality:

* Conditional logic inside repeater rows
* Conditional row limits (cap based on another field's value)
* Row calculations (sum, average, count, min, max across rows)
* Copy a row with all its values
* Collapse/expand rows
* Drag-to-reorder rows
* Automatic row numbering
* CSV export with one column per repeater field per row
* REST API support
* Module settings management page
* Priority email support

Pro is sold separately — see the [launch offer](https://fieldloops.com/launch/) for current pricing. The free version listed here is fully functional on its own — no time limit, no row cap beyond the 50-row safety limit, no nag screens.

**Requirements**

* WordPress 5.8+
* PHP 8.0+
* Gravity Forms (any current version) — the plugin will not activate without it.

**Support**

* WordPress.org plugin support forum (free users)
* Email: support@fieldloops.com
* On-site AI chat at [fieldloops.com](https://fieldloops.com/) for quick answers

**Privacy**

The free plugin makes no external HTTP calls. All form data stays on your site, stored as Gravity Forms entry meta. No analytics, telemetry, or phone-home.

== Installation ==

1. In your WordPress admin, go to **Plugins → Add New → Upload Plugin**.
2. Choose the FieldLoops Repeater ZIP, click **Install Now**, then **Activate**.
3. Open any form in the Gravity Forms editor. Under **Advanced Fields** you'll see **Repeater Group**.
4. Drag a **Repeater Group** Start marker into your form. An End marker is added automatically.
5. Place the fields you want to repeat **between** the Start and End markers.
6. Click the Start marker to set min rows, max rows, and Add/Remove button labels.
7. Save the form. The repeater is live on the frontend.

That's it. No shortcodes, no settings page to configure for the free version.

== Frequently Asked Questions ==

= What field types can I put inside a repeater group? =

Every standard Gravity Forms field: Single Line Text, Paragraph Text, Number, Email, Phone, Website, Date, Time, Drop Down, Multi Select, Checkboxes, Radio Buttons, Name, Address, File Upload, Hidden, HTML, and Section Break. Compound fields (Name, Address) are stored row-by-row.

= Where is the row data stored? =

Row 0 (the first row, the one defined in your form template) is stored natively by Gravity Forms in the entry. Additional rows are stored as entry meta keyed by the repeater group's name. They appear in the WordPress admin entry detail view, in email notifications, in merge tags, and through the Gravity Forms API.

= How do I retrieve the data programmatically? =

Use the helper function:

`$rows = flrep_get_all_rows( $entry_id, $form );`

It returns an array keyed by group name, with each group containing all submitted rows including row 0. Each row is an associative array of `field_label => value`.

= Can a repeater group span multiple pages of a multi-page form? =

No — the Start and End markers must be on the same page. Different groups can be on different pages, though.

= What's the maximum number of rows? =

50 per group. The frontend respects whatever max you set in the field settings; the 50-row hard cap exists to prevent accidental denial-of-service from misconfigured forms.

= Does it work with conditional logic on the form's other fields? =

Yes. Conditional logic on fields *outside* a repeater group works as normal. Conditional logic *inside* a repeater group (showing/hiding fields based on values in the same row) is a Pro feature.

= Is the plugin translation-ready? =

Yes. The text domain is `fieldloops-repeater-field-for-gravity-forms`. Translators can submit translations through translate.wordpress.org.

= Is it multisite compatible? =

Yes. Activate per-site or network-wide, your choice.

= Does it conflict with caching plugins or page builders? =

The repeater is rendered through Gravity Forms' standard rendering pipeline, so it works wherever Gravity Forms forms work — Elementor, Beaver Builder, Divi, Bricks, classic editor, block editor. Page caches that don't strip the GF nonce work fine.

= What happens when I upgrade to Pro? =

Pro is a separate plugin install that replaces the free version. Your existing forms, entries, and settings carry over without changes — Pro reads exactly the same data the free version writes.

== Screenshots ==

1. The Gravity Forms editor — drop any fields between a Repeater Group Start and End marker to make them repeatable.
2. The standard Gravity Forms entries list — every submission, including all repeater rows, captured as native entry data.
3. The frontend in action — visitors click "Add Person" (or any custom label you set) to insert another row for the next person.

== Changelog ==

= 1.3.37 =
* Initial public release on WordPress.org.
* Internal prefix renamed from FLR_/flr_ to FLREP_/flrep_ for uniqueness.
* Text domain renamed to fieldloops-repeater-field-for-gravity-forms.
* Debug logger now routes through PHP error_log() (honouring WP_DEBUG_LOG) instead of writing its own file.
* $_FILES upload entries are now sanitized recursively before being passed to filter callbacks.
* gform_uploaded_files JSON map is sanitized after json_decode and before re-encoding.
* Backward-compat migration for forms saved with previous flr_* field property names.

= 1.3.33 =
* Removed artificial 1-group and 3-row limits from the free edition — all core features fully available.
* Remaining "GF Repeater" name references replaced with "FieldLoops Repeater".

= 1.3.32 =
* Plugin renamed to FieldLoops - Repeater Field for Gravity Forms.
* WordPress.org review compliance — nonce verification, upload handling, debug log path.

= 1.3.23 =
* WordPress.org plugin check compliance.
* Tested up to WordPress 6.9.

= 1.3.22 =
* Free/Pro build system with feature gating.
* changelog.txt and readme.txt added.

= 1.3.0 – 1.3.21 =
* Numerous Pro feature additions (Conditional Logic, Conditional Row Limits, Row Calculations, REST API, Drag-to-reorder, Collapse/expand, Copy Row, Row Numbering, File Uploads, CSV Export) and editor UX improvements.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.3.37 =
First public release on WordPress.org. New users: install fresh. Existing users from a previous build: forms are migrated automatically — no manual action needed.
