=== ReEntry for Gravity Forms ===
Contributors: rgbivens, freemius
Tags: gravity forms, form editing, return link, magic link, edit entry
Requires at least: 6.2
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let form submitters return to their Gravity Forms entry at any time using a secure return link — no login required.

== Description ==

**ReEntry for Gravity Forms** solves a common problem: a form submitter needs to come back later and update their entry — without creating a WordPress account or remembering a password.

ReEntry generates a secure, unique return link for every submission and delivers it in the GF confirmation message and/or notification email. When the submitter returns using that link, the original form loads pre-populated with their data, ready to update.

= Free Features =

* Secure 256-bit token generation for every submission
* Return link delivered via GF confirmation and/or notification email
* `{reentry_link}` and `{reentry_url}` merge tags
* Configurable link expiry: 7 days, 30 days, 90 days, or never
* Expired link: show a custom message
* Update original entry OR create new entry on re-submission
* Revoke token from entry detail view
* Rate limiting — brute-force token guessing protection
* GDPR: IP anonymization + WordPress privacy erasure and export hooks
* `[reentry_form]` shortcode for the return page

= Pro Features =

* **Field locking** — mark individual fields as read-only on return visits via the per-form ReEntry settings
* **Access log** — every return visit logged with date, anonymized IP, browser, and result with field-level diff
* **Full admin actions** — Resend link, Reset Expiry (with custom duration or specific date), Regenerate Token, Clear Log
* **Token rotation** — generate a new link after each successful re-submission
* **Extended expiry durations** — 1 hour, 6 hours, 12 hours, 1 day, custom duration (minutes/hours/days/weeks/months), or on a specific date
* **Expired link → re-link request form** — submitter enters email to receive a fresh link, with optional auto-approve and admin approval workflow
* **Expired link → custom redirect** — send expired-link users anywhere
* **Feed re-fire configuration** — choose which GF add-on feeds (Zapier, Mailchimp, Webhooks, etc.) re-fire on return submissions
* **Editor permissions** — granular control over what Editor-role users can see and do in the ReEntry admin UI
* **Pro suspension safety** — if your license lapses, all per-form settings are preserved and instantly restored on reactivation
* **WP-CLI commands** — `wp reentry generate-tokens`, `list-tokens`, `revoke`, `stats`

= Use Cases =

* Group trip registration — leader submits trip details, returns later to add attendee roster
* School / event enrollment — initial submission + return to upload documents
* Conference speaker submissions — bio submitted now, slides uploaded closer to the event
* Healthcare intake — basic info first, insurance details added separately
* HOA / permit applications — request submitted, supporting documents added later
* Volunteer / job applications — initial form + references added in a return visit

== Installation ==

1. Upload the `reentry-for-gravity-forms` folder to `/wp-content/plugins/`
2. Activate the plugin through the Plugins menu in WordPress
3. Gravity Forms must be installed and active
4. In the Gravity Forms editor, open any form and go to the **ReEntry** settings tab
5. Enable ReEntry, configure your settings, and select or create a return page containing `[reentry_form]`

== Frequently Asked Questions ==

= Does this require GravityView? =

No. ReEntry is completely standalone and does not require GravityView or any other add-on.

= What happens if a submitter loses their return link? =

In the free version, an admin can regenerate the token from the entry detail view and manually copy the new link. ReEntry Pro adds a self-service re-link request form where submitters can enter their email to receive a fresh link automatically, with optional admin approval.

= Can I control which fields are editable on return visits? =

Yes — with ReEntry Pro, you can mark any field as locked in the ReEntry settings tab on each form. Locked fields are shown as read-only on return visits and their original values are always preserved server-side, even if someone attempts to bypass the UI.

= Can I set links to expire on a specific date? =

Yes — ReEntry Pro includes an "On a specific date" expiry mode. Set an anchor date and time, and all links on that form will expire at that exact moment. Admins can also manually reset any individual entry's expiry to a specific date from the entry detail page.

= Does it work with multi-page / paged Gravity Forms? =

Multi-step form support is planned for a future update. Single-page forms are fully supported in v1.

= What happens if my Pro license expires? =

All your per-form settings are preserved in the database — nothing is overwritten. Pro-only features are temporarily disabled and degraded to their nearest free-tier equivalent. The moment you reactivate your license, all settings are instantly restored with no reconfiguration needed.

= Is it GDPR compliant? =

Yes. IP addresses stored in the access log are anonymized (last octet zeroed for IPv4, last 80 bits zeroed for IPv6). ReEntry also registers with WordPress's built-in Tools → Erase Personal Data and Export Personal Data flows.

== External Services ==

The LunrPro admin page (Forms → LunrPro) fetches a list of available LunrPro plugins from `https://www.lunr.pro/plugins.json` to display a plugin catalogue. This request is made only when an administrator visits that page, is cached for 24 hours, and sends no personal data or site information — only a standard User-Agent string identifying the plugin version. No data is collected or stored by LunrPro as a result of this request.

LunrPro Privacy Policy: https://www.lunr.pro/privacy

This plugin also integrates with Freemius for licensing and optional analytics. Freemius may collect data subject to its own privacy policy if you opt in during activation.

Freemius Privacy Policy: https://freemius.com/privacy/

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
