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 | |
add_filter('gpeb_filters_col_rows_query', 'custom_optimize_gf_entry_meta_query_with_cache', 10, 3); | |
function custom_optimize_gf_entry_meta_query_with_cache($sql, $col, $table) { | |
// Check if the current table and column are the ones we want to optimize | |
if ($table === GFFormsModel::get_entry_meta_table_name() && $col === 'meta_key') { | |
// Attempt to retrieve cached meta_key results | |
$cached_meta_keys = get_transient('gf_entry_meta_keys'); | |
// If the cache exists, skip running the query |
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 // Remove or Validate Emojis ✮ | |
* | |
* Automatically remove or provide a validation error when emojis are submitted via a Gravity Form field. | |
* | |
* @version 1.0 | |
* @author David Smith <david@gravitywiz.com> | |
* @license GPL-2.0+ | |
* @link http://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 | |
/** | |
* Gravity Wiz // Gravity Forms // Skip Pages on Multi-Page Form | |
* http://gravitywiz.com/2012/05/04/pro-tip-skip-pages-on-multi-page-forms/ | |
*/ | |
add_filter("gform_pre_render", "gform_skip_page"); | |
function gform_skip_page($form) { | |
if(!rgpost("is_submit_{$form['id']}") && rgget('form_page') && is_user_logged_in()) | |
GFFormDisplay::$submission[$form['id']]["page_number"] = rgget('form_page'); | |
return $form; |
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/wc-gf-product-addons/wcgfpa-remove-fields.php | |
*/ | |
/** | |
* WooCommerce Gravity Forms Add-on: Add support for removing a field from the product description in the cart. | |
* | |
*/ |
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 // Advanced Conditional Logic | |
* | |
* PLEASE NOTE: This snippet is a proof-of-concept. It is not supported and we have no plans to improve it. | |
* | |
* Allows multiple groups of conditional logic per field. | |
* | |
* @version 0.1 | |
* @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 | |
/** | |
* -------------------------------------------------------------------------- | |
* IMPORTANT! | |
* This snippet has been superceded by the Choice Counter snippet. | |
* https://gist.github.com/spivurno/00af5ee7e21dd5d6903fbae6fecd85ce | |
* -------------------------------------------------------------------------- | |
* | |
* Gravity Wiz // Gravity Forms // Checkbox Count | |
* |
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
/** | |
* 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-change-field-id.js | |
*/ | |
/** | |
* Gravity Wiz // Gravity Forms // Change Field ID via Browser Console | |
* | |
* Provides a simple function for changing the ID of a Gravity Forms field via the browser console from the Form Editor page. | |
* |
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 // Populate Form with Entry (Optionally Update Entry on Submission) | |
* | |
* Pass an entry ID and populate the form automatically. No form configuration required. Optionally update the entry on | |
* submission. | |
* | |
* @version 1.5 | |
* @author David Smith <david@gravitywiz.com> | |
* @license GPL-2.0+ |
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 | |
/** | |
* Limit How Many Checkboxes Can Be Checked | |
* http://gravitywiz.com/2012/06/11/limiting-how-many-checkboxes-can-be-checked/ | |
*/ | |
class GFLimitCheckboxes { | |
public static $field_limits; |
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-submission-limit.php | |
*/ | |
/** | |
* Gravity Wiz // Gravity Forms // Limit Submissions Per Time Period (by IP, User, Role, Form URL, or Field Value) | |
* | |
* Limit the number of times a form can be submitted per a specific time period. You modify this limit to apply to |
NewerOlder