=== Gravity Forms Auto Formatter ===

Contributors: Plugin Owl
Tags: form, gravity, blacklist, block, capital, caps, case, copy, disable, disabled, gravity forms, hide, match, read only, replace 
Requires at least: 4.4
Tested up to: 6.7.3
Stable tag: 2.8.71
License: copyright 2020 Plugin Owl

This plugin extends Gravity Forms with options to automatically format letter case, append custom text before or after individul field data, perform custom blacklist validation, and perform custom text replacement on individual field data.





== Description ==

Gravity Forms Auto Formatter allows for automatic formatting of user input as well as custom field validation requirements and restrictions.

Supported field types: single line text, paragraph text, name, email, website, address, number, list, dropdown, multi select, radio buttons, checkbox, quiz, post_title, post_content, post category, post_excerpt, post_tags, post_custom_field

Not all options are available on all field types. Only options which are useful to particular field types apply to that field type. Some options like requiring matching or blocking entry between fields can be applied to supported fields and checked against unsupported fields





= Requirements =

* WordPress 4.6+
* PHP 5.6+ (5.5 and 5.4 should also function but are NOT SUPPORTED)
* Gravity Forms Version 2.0.7+

It is important to test the plugin for reliable functionality before running in any live production environment as other plugins could cause potential conflict. 





== Installation ==

First Install:
**Always backup your WordPress database and files before installing any plugins or updates!**

You can install Gravity Forms Auto Formatter through the "Add Plugins" page of the "Plugins" menu in WordPress (Plugins => Add New => Upload Plugin). Upload the plugin file without unzipping it. Or follow directions below for FTP install.

1. Unzip the plugin file.

2. Upload with your FTP software the "gravity-forms-auto-formatter" folder, and only this folder, to your plugins directory (it should be "wp-content/plugins").

3. Activate the plugin through the "Plugins" menu in WordPress.

4. Configure the plugin through the "Settings->GF Auto Formatter" options page in WordPress, and in individual form fields "advanced" options.





== UPGRADE ==

**Always backup your WordPress database and files before installing any plugins or updates!**
**Please use the [Envato Market](https://envato.com/market-plugin/) plugin to automatically upgrade the plugin. If you must upgrade manually follow the instructon below.**

1. Backup your database and WordPress installation. If you want to keep your settings on uninstall please turn on the "Save Plugin Options on Uninstall" option in this plugins Settings->GF Auto Formatter options page.

2. Save an offline backup copy of the current version gravity-forms-auto-formatter folder in your wp-content/plugins directory. 

3. Put your site into offline/maintenace mode and deactivate the "Gravity Forms Auto Formatter" plugin. Unzip the installation file and use FTP to replace your sites gravity-forms-auto-formatter folder contents in your wp-content/plugins directory with the new versions folder contents. The folder contents are normally located in wp-content->plugins->gravity-forms-auto-formatter.

4. Re-activate the "Gravity Forms Auto Formatter" plugin. Go to the "Settings->GF Auto Formatter" options page and check settings to adjust or set if needed.

5. If you encounter errors, please switch this folder back to the earlier version you saved a backup copy of using the same steps above.

7. Check the Changelog below and be sure to read the current versions additions/changes and make any neccessary configuration adjustments then take the site out of maintenance mode.






		
== Upgrade Notice ==
New in version 2.8.71
* Fixed issue with "Specified Characters Only" fields validating double quotes.





== Changelog ==

== 2.8.71 ==
* Fixed issue with "Specified Characters Only" fields validating double quotes.

== 2.8.7 ==
* Added "Specified Characters Only" fields realtime input restriction.
* Fixed issue with "Specified Characters Only" fields not prepopulating the set value in the form editor.

== 2.8.62 ==
* Fixed issue with "First letter upper case" fields not working in real time at the same time as "Alpha Only", "Numeric Only", Alpha Numeric +", and "Alpha-Numeric Only" fields
* Added php server side checks for alpha-numeric and alpha-numeric + field types on submission

== 2.8.61 ==
* Fixed issue with blank submission data of new "Alpha Numeric +" fields and "Alpha-Numeric Only" fields

== 2.8.6 ==
* Added "Alpha Numeric +" option to allow to basic alpha numeric english characters with basic punctuation.
* Added "Specified Characters Only" option to name , address, and email field types
* Tested on WP 6.7.3

== 2.8.51 ==
* Fixed issue with specified characters only on validation.
* Tested on WP 6.7.3

== 2.8.5 ==
* Setup and Use instructions improved.
* Tested on WP 6.7.2

== 2.8.41 ==
* Added Option for auto resizing text areas based on content size (BETA)

== 2.8.4 ==
* Added Option to textareas for setting a fixed row height value with number input.
* Added page load CSS for diabled and readonly fields in case JS is disabled.
* Changed min and max char inputs to number type.

== 2.8.3 ==
* Fixed warnings from incorrect format of text replacement option values.

== 2.8.2 ==
* Tested on WP 6.6.2
* Fixed alpha and alphanumeric only to work on text areas again.

== 2.8.1 ==
* Tested on WP 6.6
* Changed all substr operations to be multibyte safe for UTF-8 encoding

== 2.8 ==
* Fixed potential non-appearing special accented countries in address dropdown when editing an entry after changing address field case from standard UC first letters countries list.
* Added improved sorting of special accented countries in country list on supported servers.
* Tested on GF 2.8.6
* Tested on WP 6.4.3

== 2.7.91 ==
* Tested on WP 6.1.1
* Tested on GF 2.7.16

== 2.7.9 ==
* Fixed an issue from 2.7.8 where name and address fields flagged <,>,/ charachters as blackllisted if these characters were in blacklist although not present in the user input.

== 2.7.8 ==
* Fixed an issue where some special characters used in an input caused blacklisting to be skipped for those special characters. Central Strict Blacklist and Individual Blacklist are now more accurate with special characters.
* Tested on WP 6.2

== 2.7.7 ==
* Changed text replacement to run BOTH before (previous functionality) and after (new) other formatting is run. Text replacement will still replace things before other formatting, and will additionally replace things after other formatting again if new strings are matched. 
After other processing example: First Letters formatting can now change "my company llc" to "My Company Llc" and text replacement can now catch "Llc" and change to "LLC" (Llc::>LLC)after all the other formatting. result: "My Company LLC". 
* Tested on WP 6.1.1

== 2.7.6 ==
* Tested on WP 6.0.2

== 2.7.5 ==
* Fixed UI show/hide button functionality in field advanced options for gravity forms 2.6+
* Tested on WP 5.9.2

== 2.7.4 ==
* Added ability to use shortcodes inside GF merge tags to place shortcode content where GF merge tags are accepted. (Example {gfaf: [shortcode]}  Example usage: field default values filled by shortcodes)
* Tested on WP 5.8.2

== 2.7.3 ==
* Fixed blacklist checks for some special chars.
* Fixed central strict blacklist use without use of central standard blacklist.
* Tested on WP 5.8.1

== 2.7.2 ==
* Fixed plugin version reporting on settings page.
* Tested on WP 5.8

== 2.7.1 ==
* Fixed plugin version reporting on settings page.
* Tested on WP 5.7.2

== 2.7 ==
* Set Gravity Forms dependency for plugin activation.
* Set Gravity Forms full dependency for plugin operation.

== 2.6.1 ==
 * Fixed shown status of the auto caps "off" selection in the form editor.
* Fixed conflict between "First letter upper case" option and the auto copy value option to allow both at the same time.

== 2.6 ==
* Fixed form editor field settings loading properly with new version of WP that include new Jquery version.
* Tested on WP 5.6.1
    
== 2.5.1 ==
* Fixed display of "show FIELD LABEL" checkboxes on entry detail pages.
    
== 2.5.0 ==
* Added "Obscure Text" setting which obscure input text in fields without using a password field type so that browsers do not suggest remembering or retrieving passwords (text, textarea, name, address, email, website, list).
* Added "User Toggle Obscure Text" setting, which lets the users toggle the Obscure text feature on/off.
* Added "Turn Off Spellcheck" option which requests that browsers do not spellcheck the input.
* Updated display for Gravity Forms 2.5 compatibility.
* WordPress 5.5.1 tested.

== 2.4.9 ==
* Added protection for possible redundant WP loading errors: "cannot redeclare (function)".
* WordPress 5.3.2 tested.

== 2.4.8 ==
* WordPress 5.3 tested.

== 2.4.7 ==
* Added REAL-TIME support for ALL auto-captilization/case options on ALL supported inputs.
* WordPress 5.2.2 tested.

== 2.4.6 ==
* Added "Specified Characters Only" option to let fields only use specified characters at form validation. (text, textarea, post title/content/excerpt/tags/customfield).
* Fixed potential redundant loading of blacklist check.
* Compatibility with Gravity Forms 2.3 WordPress 5.0.3 and PHP 7.2 tested.

== 2.4.5 ==
* Added "numeric characters only" option to phone numbers with "+" as an additional allowed character.

== 2.4.4 ==
* Added section break and signature fields to display in the review page option.
* Compatibility with Gravity Forms 2.3 WordPress 5.0.3 and PHP 7.2 tested

== 2.4.3 ==
* Added "Enable Review Page" setting to the main form settings, which turns on a page where the user can review all input data before submitting the form.
* Added custom review page button text option.
* Added "User Copy Value" option which automatically copies the input from one field to another between supported field types. Supported fields: Single Line Text, Paragraph Text, Number, Email, Website, Phone, Post Title, Post Content, Post Excerpt, Post Custom Field (post custom field must be of other valid field type), Name, Address. Most fields with this option can also copy from a drop down field type. Name and address fields can only copy from other name or address fields.
* Added "User Copy Value" custom text option for displayed checkbox on form.
* Added "Auto Copy Value" option which automatically copies the input from one field to another between supported field types. Supported fields: Single Line Text, Paragraph Text, Number, Email, Website, Phone, Post Title, Post Content, Post Excerpt, Post Custom Field (post custom field must be of other valid field type). Name, Address. Most fields with this option can also copy from a drop down field type. Name and address fields can only copy from other name or address fields.

== 2.4.2 ==
* Auto case formatting now supports most all languages with UTF-8 encoding (Some Turkish may not be fully supported).
* Tested on WordPress 4.9.8

== 2.4.1 ==
* Fixed and issue with list fields giving an initial minimum character validation error when no minimum character limit is set. 

== 2.4 ==
* Added support for "Phone" as supported field type with the following options: Read Only Field, Disabled Field, Turn Off Autocomplete, Require Matching Values, Block Matching Values. 

== 2.3 ==
* Fixed Blacklisting Validation bug for all supported fields.
* Fixed Minimum Character Validation bug.
* Updated Validation code.

== 2.2 ==
* Added Numeric Characters Only field setting to only allow input of numeric (number) charachters.
* Added Alpha Characters Only field setting to only allow input of alpha (letter) charachters.
* Added Alpha-Numeric Characters Only field setting to disallow special characters and only allow input of alpha-numeric (letter and/or number) characters.
* Added support for Number fields with options: Numeric Characters Only, Read Only Field, Disabled Field, Turn Off Autocomplete, Require / Block Matching Values
* Added support for List fields with options: Auto Case Settings, Minimum Characters, Maximum Characters, Before text, After Text, Remove Links, Remove HTML/PHP, Read Only Field, Disabled Field, Turn Off Autocomplete, Numeric Characters Only, Alpha Characters Only, Alpha-Numeric characters only, Central Blacklist, Central Text Replacement, Individual Blacklist, Individual Text Replacement.
* Added ability to make Drop Down, Multi Select, Radio Buttons, and Checkboxes readonly and/or disabled.
* Strengthened readonly and disabled attributes by removing ability to click on the fields or labels on form entry.

== 2.1 ==
* Full compatibility with Gravity Forms Partial Entries Add-On.

== 2.0 ==
* Added per field Individual Blacklist. (existing blacklisting remains as universal/centralized options)
* Added per field Individual Text Replacement. (existing text replacement remains as universal/centralized options)
* Fixed "Turn Off Autocomplete" setting checkbox 
* Compatibility with Gravity Forms 2.3 WordPress 4.9 and PHP 7.1.1 tested

== 1.9.7 ==
* Added field "Minimum Charachter" requirement option for field types: text, textarea, website, email, post title, post content/body, post excerpt 
* Added field "Maximum Charachter" restriction option for field types: website, email, post title
* Added support for blacklisting of terms/phrases with commas using strict blacklist setting.
* Added support for replacement or insertion of commas using strict text replacement setting.
* Improved formatting of plugin validation messages.
* Clarified instructions
* Code improvements.

== 1.9.6 ==
* Clarified instructions.
* Fixed issue with "Strict Text Replacement" not replacing values when the search string was entered first.

== 1.9.5 ==
* Added settings link to plugins page to help guide new users.

== 1.9.4 ==
* Moved Gravity Forms Auto Formatter Field Options to fields advanced tab.  -field settings will remain.

== 1.9.3 ==
* Added option to turn off browser autocomplete for specific form fields.

== 1.9.2 ==
* Bug fix for incorrect field labels returned for required matching or non-matching field values.

== 1.9 ==
* Bug fix for flashed php warning on submission for a second if no data was entered and auto formatting was attempted.
* Bug fix for "Gravity Forms Encrypted Fields" plugin compatibility when running encryption on previous entries. 

== 1.8 ==
* Added ability to select fields as read only. Read only fields can be dynamically pre populated and their values will be included on form submission.
* Added ability to select fields as disabled. Disabled fields can be dynamically pre populated and their values will NOT be included on form submission so they can NOT be required fields. This is useful to pre populate this value for the users information but exclude it from the form submission.

== 1.7 ==
* Added "Block Matching Values" to many field types to allow for form validation blocking the same information from being entered into different form fields on the same entry. For examples: 1. You can not use the same email or phone for primary and secondary. 2. You can not enter the same data in an text input as a website input.
* Added "Require Matching Values" to many field types to allow for easily requiring select inputs to match values on the same entry to pass form validation. For example: Users entered phone, account, website, code must match.
* Subtle improvements to visual layout in field options

== 1.6 ==
* Added plugin version reporting to unlocked settings page.
* Update author links.  

== 1.5 ==
* Added "System Check" functionality to "Settings->GF Auto Formatter" options page for quick reference of meeting plugins system requirements. PHP, WordPress, and Gravity Forms versions are checked and reported.
* Updated "Before/After appended text option" to check if the before/after text already exists on field data when updating and only add the appended text if its not already there.
* Added brief instructions to "Settings->GF Auto Formatter" options page.

== 1.4  ==
* Added "Remove Links" option for automatic link removal of link functionality from submitted content.
* Added "Remove HTML/PHP" option for automatic removal of HTML tag and PHP code from submitted content.

== 1.3 ==
* Added "Reveal Blacklisted Terms/Phrases" option with custom before message option.
* Added collapsible plugin options button to form field options to keep things tidy.

== 1.2 ==
* Added "Strict Blacklist" and "Strict Text Replacement" features for additional control.	

== 1.1 ==
* Added "Before Text" and "After Text" features to allow prefixing and suffixing field data.

== 1.0 ==
* Initial version