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 Unique ID // Exclude Unique ID Fields from Gravity PDF | |
| * http://gravityperks.com | |
| */ | |
| add_filter( 'gform_form_post_get_meta', function( $form ) { | |
| foreach( $form['fields'] as &$field ) { | |
| if( $field->get_input_type() == 'uid' ) { | |
| $field->cssClass = 'exclude'; | |
| } |
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 Unique ID // Map Multiple Conditional Unique IDs to a Single Field | |
| * http://gravitywiz.com | |
| */ | |
| // update the "123" to your form ID | |
| add_filter( 'gform_entry_post_save_123', function( $entry ) { | |
| // update to your Unique ID field IDs | |
| $uid_field_ids = array( 2, 3, 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 | |
| /** | |
| * Gravity Wiz // Gravity Forms // Validate Current Password | |
| * http://gravitywiz.com/ | |
| */ | |
| // update "123" to your form ID, update "6" to your Password field ID | |
| add_filter( 'gform_field_validation_1639_1', function( $result, $value ) { | |
| $user = wp_get_current_user(); | |
| if ( ! wp_check_password( $value, $user->data->user_pass, $user->ID ) ) { | |
| $result['is_valid'] = false; |
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 Preview Submission // Display Filename for File Upload Fields | |
| * http://gravitywiz.com/documentation/gravity-forms-preview-submission/ | |
| */ | |
| add_filter( 'gpps_special_merge_tags_value_fileupload', function( $value, $field, $input_id, $modifier, $form, $entry ) { | |
| if( ! $field->multipleFiles ) { | |
| $input_name = 'input_' . str_replace( '.', '_', $field->id ); | |
| $file_info = GFFormsModel::get_temp_filename( $form['id'], $input_name ); |
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
| <script type="text/javascript"> | |
| ( function( $ ) { | |
| $( document ).bind( 'gform_post_render', function() { | |
| $( 'input[readonly="readonly"]' ).on( 'keydown', function( event ) { | |
| event.preventDefault(); | |
| } ); | |
| } ); | |
| } )( jQuery ); | |
| </script> |
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 Comment Blacklist // Modify the Blacklist Validation Message | |
| * http://gravitywiz.com/documentation/gravity-forms-comment-blacklist/ | |
| */ | |
| add_filter( 'gform_validation', function( $result ) { | |
| $my_custom_blacklist_validation_message = 'Blacklisted!'; | |
| foreach( $result['form']['fields'] as &$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 Conditional Pricing // Filter Entries by Conditionally Priced Products | |
| * http://gravitywiz.com/documentation/gravity-forms-conditional-pricing/ | |
| */ | |
| add_filter( 'gform_form_post_get_meta', function( $form ) { | |
| if( GFForms::get_page() != 'entry_list' ) { | |
| return $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
| /** | |
| * Gravity Wiz // Gravity Forms // Append Admin Label to Field Settings Toolbar (via Browser Console) | |
| * | |
| * Provides a simple function for appending the field's admin label to the field settings toolbar. | |
| * | |
| * @version 1.0 | |
| * @author David Smith <david@gravitywiz.com> | |
| * @license GPL-2.0+ | |
| * @link http://gravitywiz.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 // GP Unique ID // Add Wait-for-payment Support for 3rd-party Payment Gateways | |
| * http://gravitywiz.com/documentation/gp-unique-id/ | |
| */ | |
| // 1 - Indicate that waiting for payments is enabled. | |
| add_filter( 'gpui_wait_for_payment', '__return_true' ); | |
| // 2 - Fetch the applicable payment feed for your gateway. |