=== Store-IT - Contact ===
Contributors: storeittech
Tags: contact, form, api, store-it, integration
Requires at least: 5.0
Tested up to: 6.8
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A WordPress plugin that integrates with the Store-IT API to create customizable contact forms with automatic submission synchronization.

== Description ==

The Store-IT Contact plugin allows you to create and manage contact forms that automatically sync submissions with the Store-IT API. The plugin provides a complete form builder with styling options, field management, and multi-language support.

= Features =

* **Form Builder**: Create unlimited contact forms with customizable fields
* **Store-IT API Integration**: Automatic submission synchronization with Store-IT services
* **Multi-language Support**: Available in English, Dutch, German, Spanish, Finnish, French, and Italian
* **Customizable Styling**: Full control over form appearance including colors, fonts, and spacing
* **Field Management**: Configure field visibility, requirements, labels, and validation
* **reCAPTCHA Support**: Built-in Google reCAPTCHA integration for spam protection
* **Responsive Design**: Mobile-friendly forms that adapt to any screen size
* **Admin Dashboard**: Complete management interface for forms and submissions

= Supported Form Fields =

* Location (dropdown of available facilities)
* Request Type (dropdown of available request categories)
* Title (optional title field with predefined options)
* First Name (text input)
* Surname (text input)
* Phone Number (telephone input with validation)
* Email (email input with validation - required)
* Message (textarea for message content)
* reCAPTCHA (Google reCAPTCHA verification)
* Submit Button (form submission button)

= Multi-language Support =

The plugin includes translations for:
* English (en)
* Dutch (nl)
* German (de)
* Spanish (es)
* Finnish (fi)
* French (fr)
* Italian (it)

== Installation ==

1. Upload the `store-it-contact` folder to your `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Navigate to **Store-IT Contact > Global Settings** to configure API credentials
4. Create your first form using **Store-IT Contact > Add New Form**
5. Display forms using the shortcode `[store_it_contact_form id="your_form_id"]`

== Configuration ==

= API Settings =
1. Navigate to **Store-IT Contact > Global Settings**
2. Configure your API credentials:
   * Base URL: Your Store-IT API endpoint
   * Username: Your Store-IT API username
   * Password: Your Store-IT API password
   * Grant Type: Authentication method (default: password)
   * Client ID: Your Store-IT API client ID

= reCAPTCHA Setup (Optional) =
1. Go to **Store-IT Contact > Global Settings > reCAPTCHA**
2. Enter your Google reCAPTCHA credentials:
   * Site Key: Your reCAPTCHA site key
   * Secret Key: Your reCAPTCHA secret key

== Usage ==

= Creating a Contact Form =
1. Navigate to **Store-IT Contact > Add New Form**
2. Configure the form settings (name, title, language, request types, locations)
3. Customize styling in the **Styling** tab
4. Configure fields in the **Fields** tab
5. Set up notifications in the **Notifications** tab

= Displaying Forms =
Use the shortcode to display your form:
`[store_it_contact_form id="your_form_id"]`

== Frequently Asked Questions ==

= Do I need Store-IT API credentials? =
Yes, this plugin requires valid Store-IT API credentials to function. Contact Store-IT to obtain your API access credentials.

= Can I customize the form styling? =
Yes, the plugin includes a complete styling system where you can customize colors, fonts, spacing, and other visual elements.

= Is reCAPTCHA required? =
No, reCAPTCHA is optional. You can enable it for additional spam protection if needed.

= Can I create multiple forms? =
Yes, you can create unlimited contact forms, each with its own configuration and styling.

= Does the plugin work with mobile devices? =
Yes, all forms are responsive and work perfectly on mobile devices.

== Screenshots ==

1. Admin dashboard showing form overview
2. Form builder interface with field configuration
3. Styling options panel
4. Frontend form display
5. Global settings configuration

== Changelog ==

= 1.0.0 =
* Initial release
* Complete form builder functionality
* Store-IT API integration
* Multi-language support
* reCAPTCHA integration
* Responsive design
* WordPress security compliance

== Upgrade Notice ==

= 1.0.0 =
Initial release of the Store-IT Contact plugin.

== Requirements ==

* WordPress 5.0 or higher
* PHP 7.4 or higher
* Store-IT API access credentials
* cURL support for API communication

== External services ==

This plugin relies on external services to provide its functionality:

= Store-IT API Integration =
The plugin connects to the Store-IT API to synchronize form submissions and create customer records.
* **Service Provider**: Store-IT (https://store-it.eu/)
* **API Endpoints**: 
  - https://api.store-it365.eu (main API endpoint)
  - https://token.store-it365.eu/auth (authentication endpoint)
* **Data Sent**: Form submission data including contact information (name, email, phone, address), request type, location, and message content
* **When Data is Sent**: Every time a contact form is submitted on your website
* **Purpose**: To create customer records and tasks in the Store-IT system for business management
* **Terms of Service**: https://store-it.atlassian.net/wiki/x/EgDS5g
* **Privacy Policy**: https://store-it.atlassian.net/wiki/x/EgDS5g

= Google reCAPTCHA (Optional) =
When enabled, the plugin uses Google reCAPTCHA to prevent spam submissions.
* **Service Provider**: Google LLC
* **Service Endpoint**: https://www.google.com/recaptcha/api.js
* **Data Sent**: User interaction data and IP address for verification purposes
* **When Data is Sent**: When users interact with the reCAPTCHA widget on the contact form
* **Purpose**: Spam protection and bot detection
* **Terms of Service**: https://policies.google.com/terms
* **Privacy Policy**: https://policies.google.com/privacy

== Support ==

For support and documentation, visit:
* Store-IT Website: https://store-it.eu/
* Store-IT Software: https://store-it.eu/store356-de-software/

== License ==

This plugin is licensed under the GPL v2 or later.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA