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 // Daily Form Schedule | |
| * | |
| * Allow your form schedule to apply daily. | |
| * | |
| * @version 1.3 | |
| * @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 Limit Submissions // Apply Limit Collectively to Group of Forms | |
| * http://gravitywiz.com/documentation/gravity-forms-limit-submissions/ | |
| */ | |
| add_filter( 'gpls_rule_groups', function( $rule_groups, $form_id ) { | |
| // Update "123" to the ID of the form that will share its feeds with the other forms. | |
| $primary_form_id = 123; |
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 // Set Post Taxonomy Terms | |
| * http://gravitywiz.com/documentation/gravity-forms-populate-anything/ | |
| */ | |
| add_filter( 'gform_after_create_post', function( $post_id, $entry, $form ) { | |
| foreach( $form['fields'] as &$field ) { | |
| if( is_callable( 'gp_populate_anything' ) && $field->{'gppa-choices-enabled'} && $field->{'gppa-choices-object-type'} == 'term' ) { | |
| $value = gp_populate_anything()->get_field_value( $form, $entry, $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 // GP Limit Submissions // Apply Limit Feed to Group of Forms | |
| * http://gravitywiz.com/documentation/gravity-forms-limit-submissions/ | |
| */ | |
| add_filter( 'gpls_rule_groups', function( $rule_groups, $form_id ) { | |
| // Update "123" to the ID of your form. | |
| $primary_form_id = 123; |
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 // Limit Choices // Fix Conflict with GF Real Time Validation | |
| * http://gravitywiz.com/documentation/gravity-forms-limit-choices/ | |
| */ | |
| if( class_exists( 'Gravity_Forms_Live_Validation' ) ) { | |
| $gf_live_validation = Gravity_Forms_Live_Validation::get_instance(); | |
| remove_filter( 'gform_pre_render', array( $gf_live_validation, 'lv_apply_validations_to_form' ) ); | |
| add_filter( 'gform_pre_render', array( $gf_live_validation, 'lv_apply_validations_to_form' ), 11 ); | |
| } |
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 User Role | |
| * http://gravitywiz.com/documentation/gravity-forms-populate-anything/ | |
| */ | |
| add_filter( 'gppa_process_template', function( $value, $field, $template, $populate, $object, $object_type, $objects ) { | |
| if( $template == 'role' && is_a( $object, 'WP_User' ) ) { | |
| $value = implode( ', ', $object->roles ); | |
| } | |
| return $value; |