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 // Tag Editor | |
| * | |
| * Provides the ability to more easily modify the properties of specific tags in Gravity Forms markup. Currently supports the <form> tag. | |
| * | |
| * @version 1.0 | |
| * @author Gravity Wiz <[email protected]> | |
| * @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 Nested Forms // Populate Nested Form Field | |
| */ | |
| add_action( 'gform_enqueue_scripts', function( $form ) { | |
| if( $form['id'] == 508 ) { | |
| foreach( $form['fields'] as $field ) { | |
| if ( $field->id == 2 ) { | |
| $_POST["input_{$field->id}"] = '7631,7629'; | |
| } |
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 // Advanced Conditional Shortcodes | |
| * | |
| * [gravityforms action="conditional" relation="any" | |
| value="{:2}" operator="is" compare="First Choice" | |
| value2="{:1}" operator2="isnot" compare2="Second Choice"] | |
| Content you would like to conditionally display. | |
| [/gravityforms] | |
| * |
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 | |
| /** | |
| * Stephen Kam // Gravity Forms // Get Username from Email | |
| * | |
| * Capture username portion of an email address and store it into another field. | |
| * | |
| * @version 0.1 | |
| * @author David Smith <[email protected]> | |
| * @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 Wiz // Gravity Forms // Advanced Conditional Logic | |
| * | |
| * Allows multiple groups of conditional logic per field. | |
| * | |
| * @version 1.0 | |
| * @author David Smith <[email protected]> | |
| * @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
| /** | |
| * Numbering List Field Rows | |
| * http://demos.gravitywiz.com/numbering-gravity-forms-list-field-rows/ | |
| */ | |
| body .gw-number-rows table.gfield_list { | |
| counter-reset: gflistrowcounter; | |
| margin-left: -24px; | |
| } | |
| .gw-number-rows .gfield_list thead tr:before { | |
| content:''; |
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 // Allow filtering of entries where no checkbox is selected on the Entry List and Entry Export views. | |
| */ | |
| add_filter( 'gform_form_post_get_meta', function( $form ) { | |
| $page = GFForms::get_page(); | |
| $is_export_action = rgpost( 'action' ) == 'rg_select_export_form'; | |
| if( $page != 'entry_list' && ! $is_export_action ) { | |
| 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
| <?php | |
| /** | |
| * Gravity Perks // GP Word Count // Change Word Count Labels | |
| */ | |
| add_filter( 'gpwc_script_args', 'gpwc_modify_script_args' ); | |
| function gpwc_modify_script_args( $args ) { | |
| $args['defaultLabel'] = '{count} / {limit}'; | |
| $args['counterLabel'] = '{count} / {limit}'; | |
| $args['limitReachedLabel'] = '<span style="font-weight:bold;">{count} / {limit}</span>'; |
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
| // # Function | |
| function gwiz_get_entry_limit_percentage( $form_id ) { | |
| $form = GFAPI::get_form( $form_id ); | |
| $entry_count = RGFormsModel::get_lead_count( $form['id'], '', null, null, null, null, 'active' ); | |
| $entry_limit = rgar( $form, 'limitEntriesCount' ); | |
| $percentage = ( $entry_count * 100 ) / $entry_limit; | |
| return $percentage; |