This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gravity Perks // Populate Anything // Replace Merge Tags in Specific Context | |
* http://gravitywiz.com/documentation/gravity-forms-nested-forms/ | |
* | |
* @video https://www.loom.com/share/d626a60769ee48579b6f426a677918a3 | |
* | |
* This snippet allows you to replace a merge tag in the context of an entry selected in a GPPA-populated field. For | |
* example, if you populate a Drop Down field with entries and then have an HTML field which includes the {all_fields} | |
* merge tag, you could use the context modifier to specify that Drop Down field as the context like so: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WARNING! THIS SNIPPET MAY BE OUTDATED. | |
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library: | |
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-manual-entries.php | |
*/ | |
/** | |
* Gravity Wiz // Gravity Forms // Manual Entries | |
* | |
* Create entries manually for Gravity Forms. Adds an "Add New" button next to the page title on all entry-related pages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WARNING! THIS SNIPPET MAY BE OUTDATED. | |
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library: | |
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-min-and-max-character-limit.php | |
*/ | |
/** | |
* Gravity Wiz // Require Minimum Character Limit for Gravity Forms | |
* | |
* Adds support for requiring a minimum number of characters for text-based Gravity Form fields. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gravity Wiz // Gravity Forms // Filter Out $0.00 Products | |
* http://gravitywiz.com/ | |
*/ | |
add_filter( 'gform_product_info', 'gw_remove_empty_products', 10, 3 ); | |
function gw_remove_empty_products( $product_info, $form, $lead ) { | |
$products = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gravity Perks // GP Limit Choices // Field Group | |
* | |
* Specify a group of fields that should create a unique choice to limited. For example, a Date field and Radio Button field could be | |
* combined to sell x tickets per date where the ticket type is controlled by the Radio Button field and the date is | |
* selected in the Date field. | |
* | |
* @version 1.4 | |
* @author David Smith <david@gravitywiz.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WARNING! THIS SNIPPET MAY BE OUTDATED. | |
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library: | |
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-day-count.php | |
*/ | |
/** | |
* Gravity Wiz // Calculate Number of Days Between Two Gravity Form Date Fields | |
* | |
* Allows you to calculated the number of days between two Gravity Form date fields and populate that number into a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Use Gravity Forms Conditional Logic with Dates | |
* http://gravitywiz.com/use-gravity-forms-conditional-logic-with-dates/ | |
*/ | |
add_filter("gform_field_value_timestamp", "gwiz_populate_timestamp"); | |
function gwiz_populate_timestamp( $value ){ | |
return time(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"USD": { | |
"name": "U.S. Dollar", | |
"symbol_left": "$", | |
"symbol_right": "", | |
"symbol_padding": "", | |
"thousand_separator": ",", | |
"decimal_separator": ".", | |
"decimals": 2 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gravity Wiz // Gravity Forms // Export Multi-input Fields in a Single Column | |
* | |
* By default, Gravity Forms only allows you to export each input of a multi-input field (e.g. Checkbox field, | |
* Name Field, etc) as a separate column. This snippet allows you to export all inputs (of a specific field) in a | |
* single column. | |
* | |
* @version 1.2 | |
* @author David Smith <david@gravitywiz.com> |