=== RT Frontend Entry View for Gravity Forms ===
Tags: gravity forms, entries, frontend, shortcode, form entries, entry view, gravity forms frontend, table view, filter entries, export entries
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display Gravity Forms entries on the frontend with a simple shortcode. Supports filtering, search, pagination, export, and custom views.

== Description ==

**RT Frontend Entry View for Gravity Forms** lets you display Gravity Forms entries anywhere on your WordPress site using a simple shortcode — no coding required. Built with a React-powered frontend, it delivers a fast, responsive, and interactive table of form entries directly on your pages or posts.

Whether you want to publish a directory, show user submissions, or create an internal dashboard, this plugin gives you full control over which entries are shown, how they look, and how visitors interact with them.

=== Key Features ===

* **Frontend Entry Table** — Display form entries in a clean, responsive table layout that works on all screen sizes.
* **Views System** — Create multiple named Views, each with its own form, columns, filters, colors, and shortcode. One plugin, many use cases.
* **AJAX Search & Pagination** — Real-time global search and paginated results without page reloads, keeping your site fast.
* **Advanced Filtering** — Filter entries by field value using operators: Contains, Equals, Starts With, Ends With, and IS NOT. Date-range filtering is supported for date fields.
* **Column Customizer** — Let visitors toggle which columns are visible and reorder them via an intuitive modal interface.
* **Entry Details Modal** — Click any row to open a full-detail popup modal without leaving the page.
* **Export to CSV & Excel** — Built-in export button lets users download entries in CSV or Excel format.
* **Custom Styling** — Set primary color, secondary color, and table header color to match your theme — no CSS required.
* **Shortcode Driven** — Paste a shortcode anywhere: pages, posts, widgets, or page builders.
* **Gravity Forms Native** — Reads entries directly through the official `GFAPI`, ensuring compatibility and security.

=== Who Is This Plugin For? ===

* **Businesses** showing customer submissions, service requests, or inquiry forms on a members-only page.
* **Nonprofits** publishing volunteer sign-ups or event registrations.
* **Developers** who need a configurable entry display without building a custom solution from scratch.
* **Site owners** who want to share form data with logged-in users or the public in a readable, filterable table.

=== How It Works ===

1. Install and activate the plugin alongside Gravity Forms.
2. Go to the **RT GF Views** menu in the WordPress admin.
3. Create a new View: choose a form, select which fields to display, configure filters, sorting, and colors.
4. Copy the generated shortcode (e.g. `[rt_gf_entries_view view_id="5"]`).
5. Paste the shortcode into any page or post — done.

The plugin registers a custom REST API endpoint (`/wp-json/rt-gf/v1/entries`) that the React frontend uses to fetch entries dynamically. All data is retrieved through Gravity Forms' own `GFAPI` for reliability and compatibility.

== Installation ==

1. Upload the `rt-frontend-entry-view-for-gravity-forms` folder to the `/wp-content/plugins/` directory, or install it via the WordPress admin **Plugins > Add New** screen.
2. Activate the plugin through **Plugins** in your WordPress admin.
3. Make sure **Gravity Forms** is installed and activated — the plugin will display an admin notice if it is missing.
4. Navigate to **RT GF Views** in the admin sidebar to create your first View.

== Shortcode Usage ==

=== Recommended: Using a View ===

Create a View in the admin panel to configure all settings visually, then use the generated shortcode:

`[rt_gf_entries_view view_id="123"]`

* `view_id` — The ID of your saved View. All display settings, colors, and filters come from the View.

=== Basic Usage (no View required) ===

Display entries for any form directly by its Form ID using default settings:

`[rt_gf_entries_view form_id="1"]`

Optional attributes:

* `limit` — Number of entries shown per page. Default: `10`. Example: `limit="25"`.

Full example:

`[rt_gf_entries_view form_id="2" limit="20"]`

== Frequently Asked Questions ==

= Does this plugin work without Gravity Forms? =

No. Gravity Forms must be installed and activated. The plugin checks for `GFAPI` on load and shows an admin notice if Gravity Forms is missing.

= Can I create more than one View for the same form? =

Yes. You can create as many Views as you like, even for the same form. Each View has its own selected columns, filters, sort order, colors, and shortcode — allowing different displays on different pages.

= Can I filter entries by date range? =

Yes. When Advanced Filters are enabled in a View, date fields support start-date and end-date range filtering.

= What filter operators are supported? =

The following operators are available for text-based fields: **Contains**, **Equals**, **Starts With**, **Ends With**, and **IS NOT**.

= Can visitors export the entries they see? =

Yes. When the Export feature is enabled in a View, a button appears that allows visitors to download the current set of entries as a **CSV** or **Excel** file.

= Can visitors customise which columns they see? =

Yes. When the Column Customizer is enabled, visitors can open a modal to show/hide columns and drag to reorder them. Their preferences apply immediately without reloading the page.

= Is the entry table mobile-friendly? =

Yes. The frontend table is built with responsive CSS and adapts to smaller screens automatically.

= Does the plugin add anything to my database? =

Yes. On activation, the plugin creates a small meta table (`{prefix}_rt_gf_view_meta`) to store View settings efficiently. Views themselves are stored as a custom post type (`rt_gf_view`). The table is created automatically and upgraded silently on plugin updates.

= Are the REST API endpoints public? =

By default the `/wp-json/rt-gf/v1/entries` endpoint is publicly accessible so that the shortcode can display entries to all visitors. If you need to restrict access to logged-in users only, use a capability check filter — or contact us for guidance.

= Which versions of WordPress and PHP are supported? =

WordPress 6.0 or higher and PHP 7.4 or higher. Tested up to WordPress 6.8.

== Screenshots ==

1. Frontend entry table with search, pagination, and export button.
2. Advanced filter panel with field-level operators and date-range support.
3. Column customizer modal — toggle and reorder columns.
4. Entry detail modal — full entry view on row click.
5. Admin View editor — configure form, columns, features, sorting, and colors.
6. Shortcode display panel — copy the generated shortcode for any View.

== Changelog ==

= 1.3 =
* Improved View model: settings stored as a JSON blob in a dedicated meta table — new settings require no DB migration.
* Auto-upgrade routine runs on every load and silently skips if the schema is already current.
* Sort field and sort direction are now configurable per View.
* Filterable fields are now saved and passed to the frontend per View.
* Minor stability improvements.

= 1.1 =
* Added Views System — create and manage multiple Views with individual settings.
* Added Column Customizer feature.
* Added Entry Details Modal feature.
* Added Advanced Filters with operator support (Contains, Equals, Starts With, Ends With, IS NOT).
* Added date-range filtering for Date fields.
* Added Export to CSV and Excel.
* Added custom color settings (primary, secondary, table header).

= 1.0 =
* Initial release — basic frontend entry listing with AJAX pagination and global search.

== Upgrade Notice ==

= 1.3 =
Settings are now stored in a new meta table. The upgrade runs automatically on plugin load — no manual steps required. Please back up your database before upgrading as a precaution.

== License ==

RT Frontend Entry View for Gravity Forms is licensed under the GPLv2 or later.
Full license text: https://www.gnu.org/licenses/gpl-2.0.html