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 | |
//copy everything below this line | |
/** | |
* GravityRanger Login Logout Shortcode | |
* | |
* Creates a login/logout shortcode button | |
* https://gravityranger.com/login-logout-shortcode-for-gravity-forms-membership-sites/ | |
* | |
* Used for creating a login/logout shortcode to be used with a WordPress website. |
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
<script> | |
jQuery(document).ready(function($) { | |
$('input[type=radio], select').on('change', function() { | |
$(this).closest("form").submit(); | |
}); | |
}); | |
</script> |
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 | |
// Copy everything below this line | |
add_filter( 'gform_field_value_default_quantity', 'gr_default_qty' ); | |
function gr_default_qty() { | |
return 0; // change this number to your desired default quantity | |
} |
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 | |
//Code provided by Gravity Forms here: https://rocketgenius.pxf.io/limit-payments | |
//Start copying below this line... | |
add_action( 'gform_post_add_subscription_payment', function ( $entry ) { | |
gf_stripe()->log_debug( "Running..." ); | |
if ( rgar( $entry, 'payment_status' ) == 'Active' ) { | |
$feed = gf_stripe()->get_payment_feed( $entry ); |
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 | |
//Copy everything below this point | |
add_action( 'admin_head', function () { ?> | |
<style> | |
header.gform-settings-header .gform-settings__wrapper { | |
/* this will hide the whole thing, including image */ | |
display: none; | |
} |
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
<script type="text/javascript"> | |
jQuery(document).ready(function(){ | |
/* apply only to a input with a class of gf_readonly */ | |
jQuery(".gf_readonly input").attr("readonly","readonly"); | |
}); | |
</script> |
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 | |
// Do NOT include the opening php tag | |
// Replace 1 with your forms ID | |
// Replace User Notification with the name of your notification | |
// Insert your file path | |
add_filter( 'gform_notification_1', 'add_notification_attachments', 10, 3 ); | |
function add_notification_attachments( $notification, $form, $entry ) { | |
if ( $notification['name'] == 'User Notification' ) { | |
$path = 'path/to/file.pdf'; |