=== NEXU G-Sheets ===
Contributors: nexuwp
Tags: gravity forms, google sheets, form export, automation, service account
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.37.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect Gravity Forms directly to Google Sheets with Service Account auth, live sync, edit updates, and batch export.

== Description ==

NEXU G-Sheets sends Gravity Forms entries directly to your Google Sheets without Zapier.

Features:
- Real-time feed processing on submission.
- Edit entry sync (updates row instead of duplicate).
- Batch export historical entries (AJAX, 50 per batch).
- Persian/RTL-safe value normalization before sync.
- File upload values exported as URLs.

== Installation ==

1. Upload `nexu-gf-gsheets` to `/wp-content/plugins/`.
2. Activate the plugin.
3. Make sure Gravity Forms is active.
4. Install google/apiclient in this plugin and load `vendor/autoload.php`.
5. Go to Forms > Settings > NEXU G-Sheets and paste your Service Account JSON.
6. Share your target Google Sheet with service-account email.
7. Create a feed inside each form and map columns.

== How To Create Service Account Key ==

1. Open Google Cloud Console and create/select a project.
2. Enable Google Sheets API.
3. Create a Service Account in IAM & Admin.
4. Create JSON key and copy its content.
5. Share the destination sheet with the service account email.

Reference tutorial:
https://developers.google.com/sheets/api/quickstart/php

== Changelog ==

= 1.37.0 =
* Fixed UI issues in settings pages: Corrected button text color and enqueued Font Awesome for icons.

= 1.36.0 =
* Fixed bug in feed list table: Added missing columns (Feed Name, Spreadsheet ID, Sheet Name) to make feeds clickable and editable.

= 1.35.0 =
* Integrated Setup Wizard access: Added a prominent "Open Setup Wizard" button to both Global and Feed settings pages for easier onboarding.

= 1.34.0 =
* Setup Wizard Optimization: Moved Spreadsheet URL guide to the Test Connection step and cleaned up the Share step.

= 1.33.0 =
* Improved Setup Wizard: Added Spreadsheet URL extraction guide image to the Test Connection step for better clarity.

= 1.32.0 =
* Comprehensive Setup Wizard Update: Integrated all 26 help images across detailed steps.
* Multi-image support per step: Added ability to display multiple instructional images for complex tasks.
* Refined step-by-step instructions for better clarity on Google Cloud and Spreadsheet sharing.

= 1.31.0 =
* Fixed progress bar layout: Removed overlapping text labels and replaced with a clean, dynamic title display.
* Enhanced help images: Images are now presented in a styled container with a subtle background for better visual separation.

= 1.30.0 =
* Refined Setup Wizard UI: Fixed progress bar overlap, improved typography, and added styled containers for help images.
* Optimized image presentation: Images are now smaller and centered within a subtle gray background for a cleaner look.

= 1.29.0 =
* Optimized Setup Wizard UX: Added sticky footer for navigation, reduced vertical height, and improved typography.
* Fixed layout to prevent unnecessary scrolling during onboarding.

= 1.28.0 =
* Major UI Overhaul: Redesigned Setup Wizard with a centered, card-based layout for better readability.
* Improved image placement: Help images are now positioned below instructions for a cleaner flow.
* Responsive horizontal progress indicator with tooltips.

= 1.27.0 =
* Complete redesign of the Setup Wizard: Modern UI, step-by-step guidance with images, and integrated configuration.
* Added image lightbox for better viewing of setup steps.
* Improved navigation and progress tracking during onboarding.

= 1.26.0 =
* Improved UI responsiveness: Spreadsheet URLs are now instantly converted to IDs upon pasting in all settings fields.

= 1.25.0 =
* Added automatic Spreadsheet ID extraction from full URLs in all settings fields.

= 1.24.0 =
* Re-enabled persistent storage for the default Spreadsheet ID to ensure reliable connection testing.
* Fixed saving issues in the setup wizard.

= 1.23.0 =
* Removed global Spreadsheet ID storage; Spreadsheet ID is now feed-level only.
* Updated setup wizard and connection testing flow to use per-form/feed Spreadsheet IDs.

= 1.22.0 =
* Reworked setup into a true guided wizard with step navigation, exact Google links, and action checklists.
* Improved onboarding clarity for non-technical users with explicit step-by-step flow.

= 1.21.0 =
* Moved setup wizard registration to a core WordPress admin parent for reliable access.

= 1.20.0 =
* Fixed admin capability mapping for wizard/settings/export pages to prevent "not allowed" access errors.

= 1.19.0 =
* Added a dedicated 3-step setup wizard for JSON key, spreadsheet setup, and connection testing.
* Added a direct "Setup Wizard" quick link in the Plugins list for faster onboarding.
* Added safer wizard-based settings persistence to avoid data loss during setup.

= 1.16.0 =
* Added fail-safe inline button handlers for Fetch Headers and Test Connection.
* Broadened admin asset enqueue detection to load reliably across Gravity Forms admin pages.

