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 | |
/** | |
* -------------------------------------------------------------------------- | |
* IMPORTANT! | |
* This snippet has been superceded by the Choice Counter snippet. | |
* https://gist.github.com/spivurno/00af5ee7e21dd5d6903fbae6fecd85ce | |
* -------------------------------------------------------------------------- | |
* | |
* Gravity Wiz // Gravity Forms // Checkbox Count | |
* |
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 | |
/** | |
* Gravity Wiz // Gravity Forms // Advanced Conditional Logic | |
* | |
* PLEASE NOTE: This snippet is a proof-of-concept. It is not supported and we have no plans to improve it. | |
* | |
* Allows multiple groups of conditional logic per field. | |
* | |
* @version 0.1 | |
* @author David Smith <david@gravitywiz.com> |
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
/** | |
* WARNING! THIS SNIPPET MAY BE OUTDATED. | |
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library: | |
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-change-field-id.js | |
*/ | |
/** | |
* Gravity Wiz // Gravity Forms // Change Field ID via Browser Console | |
* | |
* Provides a simple function for changing the ID of a Gravity Forms field via the browser console from the Form Editor page. | |
* |
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 | |
/** | |
* Gravity Wiz // Gravity Forms // Populate Form with Entry (Optionally Update Entry on Submission) | |
* | |
* Pass an entry ID and populate the form automatically. No form configuration required. Optionally update the entry on | |
* submission. | |
* | |
* @version 1.5 | |
* @author David Smith <david@gravitywiz.com> | |
* @license GPL-2.0+ |
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 | |
/** | |
* Limit How Many Checkboxes Can Be Checked | |
* http://gravitywiz.com/2012/06/11/limiting-how-many-checkboxes-can-be-checked/ | |
*/ | |
class GFLimitCheckboxes { | |
public static $field_limits; |
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 | |
/** | |
* WARNING! THIS SNIPPET MAY BE OUTDATED. | |
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library: | |
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-submission-limit.php | |
*/ | |
/** | |
* Gravity Wiz // Gravity Forms // Limit Submissions Per Time Period (by IP, User, Role, Form URL, or Field Value) | |
* | |
* Limit the number of times a form can be submitted per a specific time period. You modify this limit to apply to |
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 | |
// standard usage | |
new GFLimitCheckboxes(115, array( | |
5 => array( | |
'min' => 2, | |
'max' => 3 | |
) | |
)); |
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 | |
// Disable auto-complete on form. | |
add_filter( 'gform_form_tag', function( $form_tag ) { | |
return str_replace( '>', ' autocomplete="off">', $form_tag ); | |
}, 11 ); | |
// Diable auto-complete on each field. | |
add_filter( 'gform_field_content', function( $input ) { | |
return preg_replace( '/<(input|textarea)/', '<${1} autocomplete="off" ', $input ); |
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 | |
/** | |
* Gravity Wiz // Gravity Forms // Give First Validation Error Focus | |
* http://gravitywiz.com/ | |
* | |
* Plugin Name: Gravity Forms First Error Focus | |
* Plugin URI: https://gravitywiz.com/make-gravity-forms-validation-errors-mobile-friendlyer/ | |
* Description: Automatically focus (and scroll) to the first field with a validation error. | |
* Author: Gravity Wiz | |
* Version: 1.1 |
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 | |
/** | |
* Gravity Wiz // Gravity Forms // Set Input Type as Tel | |
* http://gravitywiz.com/ | |
*/ | |
add_filter( 'gform_field_content_723_10', 'gw_set_tel_input_type' ); | |
function gw_set_tel_input_type( $input ) { | |
$input = preg_replace( "/type='[\\w]+'/", "type='tel'", $input ); | |
return $input; | |
} |
NewerOlder