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 | |
/** | |
* Gravity Perks // Populate Anything // Populate Pipe Video URL | |
* https://gravitywiz.com/documentation/gravity-forms-populate-anything/ | |
* | |
* By default, when populating a Pipe field's value, the Pipe add-on returns an array which includes the video URL and a thumbnail. | |
* This snippet allows you to just populate the video URL. | |
* Just add the "gppa-pipe-video" CSS class to the populated field's CSS Class Name setting. | |
*/ | |
add_filter( 'gppa_process_template_value', function( $template_value, $field ) { |
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 | |
/** | |
* Gravity Perks // GP Nested Forms // Ignore the first `n` child entries with `:count` merge tag modifier | |
* https://gravitywiz.com/documentation/gravity-forms-nested-forms | |
* | |
* Also works with `:total` merge tag modifier | |
* | |
* Instructions: | |
* | |
* 1. Install this snippet per https://gravitywiz.com/documentation/how-do-i-install-a-snippet/ |
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
/** | |
* Gravity Perks // GP Nested Forms // Ignore the first `n` child entries with `:count` merge tag modifier | |
* https://gravitywiz.com/documentation/gravity-forms-nested-forms | |
* | |
* Also works with `:total` merge tag modifier | |
* | |
* Instructions: | |
* | |
* 1. Install this snippet with our free Custom JavaScript plugin. | |
* https://gravitywiz.com/gravity-forms-custom-javascript/ |
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 | |
/** | |
* Gravity Perks // GP Google Sheets // Admin Columns Pro Inline Edit Compatability | |
* | |
* Allow the Google Sheet to be updated after the entry is edited by Admin Columns Pro Inline Edit | |
* | |
* Installation: | |
* 1. Install per https://gravitywiz.com/documentation/how-do-i-install-a-snippet/ | |
*/ | |
add_action( 'acp/editing/saved', function ( AC\Column $column, $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
<?php | |
/** | |
* Gravity Perks // Populate Anything // Range Modifier for Live Merge Tags | |
* https://gravitywiz.com/documentation/gravity-forms-populate-anything/ | |
* | |
* Use the :range modifier with checkbox merge tags to get the range of checked options | |
* Works well with the :value modifier | |
* | |
* Will return `x - y` where the min and max are different, or `x` if they are the same |
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 | |
/** | |
* Gravity Perks // GF Better User Activation // Set Redirect URL by User Role | |
* http://gravitywiz.com/documentation/gravity-forms-better-user-activation/ | |
*/ | |
add_filter( 'gpbua_activation_redirect_url', function( $url, $activation ) { | |
// Enter the roles and redirect URLs | |
$redirects = array( | |
'subscriber' => 'https://google.com', |
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 | |
/** | |
* Gravity Perks // Populate Anything // Populate JetSloth with ACF Image Field | |
* https://gravitywiz.com/documentation/gravity-forms-populate-anything/ | |
* | |
* Instructions: | |
* | |
* 1. Go to the field settings for the Gravity Forms choice field you are populating. | |
* 3. Add "gppa-jetsloth-acf-image" to the "Custom CSS Class" setting (on the Appearance tab). | |
* |
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 | |
/** | |
* Gravity Shop // GS Product Configurator // Don't Delay User Registration Feed | |
* | |
* Instructions: | |
* 1. Install per https://gravitywiz.com/documentation/how-do-i-install-a-snippet/ | |
*/ | |
add_filter( 'gspc_delay_feed_processing', function( $delay, $form, $entry, $slug, $payment_feed ){ | |
if( $slug === 'gravityformsuserregistration' ){ |
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 | |
/** | |
* Gravity Perks // Address Autocomplete // Update GravityView Geocoder with coordinates | |
* https://gravitywiz.com/documentation/gravity-forms-address-autocomplete/ | |
*/ | |
// Replace 123 with your form ID | |
add_action( 'gform_after_submission_123', function ( $entry, $form ){ | |
$address_field_id = 4; // Replace 4 with your address field ID | |
$lat_field_id = 6; // Replace 6 with your latitude 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
<?php | |
/** | |
* Gravity Perks // Notification Scheduler // Custom Repeat Schedule | |
* https://gravitywiz.com/documentation/gravity-forms-notification-scheduler/ | |
*/ | |
add_filter( 'gpns_schedule_timestamp', function ( $timestamp, $notification, $entry, $is_recurring, $current_time ) { | |
// Update "123" to the form ID. | |
$form_id = 123; |