Skip to content

Instantly share code, notes, and snippets.

David Smith spivurno

Block or report user

Report or block spivurno

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@spivurno
spivurno / gw-require-list-columns.php
Last active May 11, 2018 — forked from spivurno/gist:3708669
Gravity Wiz // Require All Columns of List Field
View gw-require-list-columns.php
<?php
/**
* Require All Columns of List Field
* http://gravitywiz.com/require-all-columns-of-list-field/
*/
class GWRequireListColumns {
private $field_ids;
public static $fields_with_req_cols = array();
@spivurno
spivurno / gist:4005684
Last active Oct 12, 2015 — forked from spivurno/gist:3708752
Gravity Wiz // Limit How Many Checkboxes Can Be Checked (and How Many MUST Be Checked)
View gist:4005684
<?php
/**
* Limit How Many Checkboxes Can Be Checked
* http://gravitywiz.com/2012/06/11/limiting-how-many-checkboxes-can-be-checked/
*/
class GFLimitCheckboxes {
private $form_id;
View gist:4005779
new GFLimitCheckboxes(FORM_ID, array(
FIELD_ID => array(
'min' => MIN_NUMBER,
'max' => MAX_NUMBER
)
));
@spivurno
spivurno / gw-limit-checkboxes-usage.php
Last active Oct 12, 2015 — forked from spivurno/gist:4005779
Gravity Wiz // Limit Checkboxes Usage
View gw-limit-checkboxes-usage.php
<?php
// standard usage
new GFLimitCheckboxes(115, array(
5 => array(
'min' => 2,
'max' => 3
)
));
@spivurno
spivurno / gw-gravity-forms-submission-limit.php
Last active Nov 10, 2018 — forked from spivurno/gist:3710653
Gravity Wiz // Gravity Forms // Limit Submissions Per Time Period (by IP, User, Role, Form URL, or Field Value)
View gw-gravity-forms-submission-limit.php
<?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
* the visitor's IP address, the user's ID, the user's role, a specific form URL, or the value of a specific field.
* These "limiters" can be combined to create more complex limitations.
*
* @version 3.0
* @author David Smith <david@gravitywiz.com>
@spivurno
spivurno / keyboard-shortcuts.md
Created Oct 9, 2013
Here are some things you can do with Gists in GistBox.
View keyboard-shortcuts.md

Create documentation for your projects. Like so:


Most popular keyboard shortcuts within GistBox

  • Up/Down - Previous/Next Gist
  • Ctrl+e - Edit a selected Gist
  • Ctrl+s - Save Gist
View gravity-forms-disable-autocomplete.php
<?php
add_filter( 'gform_form_tag', 'gform_form_tag_autocomplete', 11, 2 );
function gform_form_tag_autocomplete( $form_tag, $form ) {
if ( is_admin() ) return $form_tag;
if ( GFFormsModel::is_html5_enabled() ) {
$form_tag = str_replace( '>', ' autocomplete="off">', $form_tag );
}
return $form_tag;
}
add_filter( 'gform_field_content', 'gform_form_input_autocomplete', 11, 5 );
@spivurno
spivurno / gw-gravity-forms-set-input-as-tel.php
Last active Feb 6, 2017 — forked from hirejordansmith/convert-text-field-tel-field.php
Gravity Wiz // Gravity Forms // Set Input Type as Tel
View gw-gravity-forms-set-input-as-tel.php
<?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;
}
@spivurno
spivurno / gw-gravity-forms-first-error-focus.php Gravity Wiz // Gravity Forms // Give First Validation Error Focus
View gw-gravity-forms-first-error-focus.php
<?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
You can’t perform that action at this time.