This file contains hidden or 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 | |
/** | |
* Modified version of this snippet: https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-capitilize-submitted-data.php | |
* | |
* Capitializes all words in Single Line Text, Paragraph Text, Address and Name fields - only when the value is all UPPERCASE or all lowercase | |
*/ | |
// Update "123" to the ID of the Form | |
add_action( 'gform_pre_submission_123', 'gw_capitalize_uppercase_lowercase_data' ); | |
function gw_capitalize_uppercase_lowercase_data( $form ) { |
This file contains hidden or 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 | |
/** | |
* Prevent Gravity Perks Address Autocomplete scripts from being blocked by SiteGround Optimizer | |
*/ | |
add_filter( 'sgo_javascript_combine_exclude', 'js_combine_exclude' ); | |
function js_combine_exclude( $exclude_list ) { | |
$exclude_list[] = 'gp-address-autocomplete'; | |
$exclude_list[] = 'gp-address-autocomplete-google'; |
This file contains hidden or 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 | |
/** | |
* Save multiple fields in different forms as uppercase when form is submitted | |
*/ | |
add_action( 'gform_pre_submission_123', function ( $form ) { // Change 123 to your first form ID | |
$fields = array(2,9,12); // Enter your field IDs here, separated by commas. In this case it will apply to fields 2, 9 and 12 | |
This file contains hidden or 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 | |
/** | |
* Save field in uppercase when form is submitted | |
*/ | |
add_action( 'gform_pre_submission_123', 'gw_capitalize_submitted_data' ); // Replace 123 with your form ID | |
function gw_capitalize_submitted_data( $form ) { | |
$input_key = sprintf( 'input_%s', 1 ); // Replace 1 with your field ID |
This file contains hidden or 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
/** | |
* Selectively apply Gravity Perks Copy Cat "Copy Label (instead of Value)" snippet - https://github.com/gravitywiz/snippet-library/blob/master/gp-copy-cat/gpcc-copy-label.js | |
*/ | |
/** | |
* Apply snippet to single Copy Cat | |
* | |
* In this example, the snippet will apply only in this case: | |
* - Copying Field ID 3 to Field ID 4 |
This file contains hidden or 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_action( 'gform_after_submission_18', function( $entry ){ | |
$first_entry = GFAPI::get_entry( rgar( $entry, 3 ) ); | |
gp_notification_scheduler()->delete_notification_queue( array(), $first_entry ); | |
}); |
NewerOlder