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 // Nested Forms // Re-order Display Fields | |
| * http://gravitywiz.com/documentation/gravity-forms-nested-forms/ | |
| */ | |
| // Update "123" to your form ID. | |
| add_filter( 'gform_pre_render_123', function( $form ) { | |
| foreach( $form['fields'] as &$field ) { | |
| // Update "2" to your Nested Form field ID. | |
| if( $field->id = 2 ) { |
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 // Conditional Logic Dates // Fix Conflict w/ WC GF Product Add-ons | |
| * http://gravitywiz.com/documentation/gravity-forms-conditional-logic-dates/ | |
| */ | |
| add_filter( 'woocommerce_get_cart_item_from_session', function( $return ) { | |
| add_filter( 'gform_form_post_get_meta', function( $form ) { | |
| if( class_exists( 'GP_Conditional_Logic_Dates' ) ) { | |
| $form = GP_Conditional_Logic_Dates::$instance->modify_frontend_form_object( $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 | |
| /** | |
| * Gravity Perks // Nested Forms // Copy Parent Entry Properties on Parent Form Submission | |
| * http://gravitywiz.com/documentation/gravity-forms-nested-forms/ | |
| */ | |
| // Update "123" to your parent form ID. | |
| add_action( 'gform_entry_created_123', function( $entry, $form ) { | |
| // Specify which properties you would like to populate from the parent. | |
| // Supports: id, form_id, post_id, date_created, is_starred, is_read, ip, source_url, user_agent, currency, payment_status, payment_date, payment_amount, payment_method, transaction_id, is_fulfilled, created_by, transaction_type, status, date_updated, last_payment_date |
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 // Nested Forms // Force {Parent} Merge Tag Replacement on Submission | |
| * http://gravitywiz.com/documentation/gravity-forms-nested-forms/ | |
| */ | |
| add_filter( 'gform_entry_post_save', function( $entry, $form ) { | |
| foreach( $form['fields'] as &$field ) { | |
| if( $field->get_input_type() == 'form' ) { | |
| $child_form_id = $field->gpnfForm; |
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 Populate Anything // Only Show Unique Choices | |
| * http://gravitywiz.com/documentation/gravity-forms-populate-anything/ | |
| */ | |
| add_filter( 'gppa_input_choices', function( $choices ) { | |
| global $gppa_uniques; | |
| $gppa_uniques = array(); | |
| $choices = array_filter( $choices, function( $var ) { | |
| global $gppa_uniques; |
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 | |
| class GW_Limit_Populated_Choices { | |
| public function __construct( $args = array() ) { | |
| // set our default arguments, parse against the provided arguments, and store for use throughout the class | |
| $this->_args = wp_parse_args( $args, array( | |
| 'form_id' => false, | |
| 'field_id' => 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 Limit Submissions // Disable Limit Feeds when Editing via Sticky List | |
| * http://gravitywiz.com/documentation/gravity-forms-limit-submissions/ | |
| */ | |
| add_filter( 'gpls_rule_groups', function( $rule_groups, $form_id ) { | |
| if( rgpost( 'mode' ) == 'edit' ) { | |
| $rule_groups = array(); | |
| } |
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 Populate Anything // Tiny Mailing List | |
| * http://gravitywiz.com/documentation/gravity-forms-populate-anything/ | |
| * | |
| * Send an email all users who have submitted Form A when Form B is submitted. This *should not* be used | |
| * to large numbers of notifications. | |
| * | |
| * # Instructions | |
| * |