Skip to content

Instantly share code, notes, and snippets.

@spivurno
spivurno / gw-gravity-forms-advanced-conditional-logic.php
Last active Jul 15, 2021
Gravity Wiz // Gravity Forms // Advanced Conditional Logic
View gw-gravity-forms-advanced-conditional-logic.php
<?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>
@spivurno
spivurno / gp-nested-forms-populate-nested-form-field.php
Created Apr 26, 2016
Gravity Perks // GP Nested Forms // Populate Nested Form Field
View gp-nested-forms-populate-nested-form-field.php
<?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';
}
@spivurno
spivurno / ch-gravity-forms-date-rounder.php
Created Mar 3, 2015
Ounce // Gravity Forms // Date Rounder
View ch-gravity-forms-date-rounder.php
<?php
/**
* Ounce // Gravity Forms // Date Rounder
*
* Allows the ability to round the date up (or down) to a day of the month.
*
* @version 1.0
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+
* @link http://gravitywiz.com/...
@spivurno
spivurno / gw-gravity-forms-create-coupons.php
Last active Oct 7, 2021
Gravity Wiz // Gravity Forms // Create Coupons with Gravity Forms for Gravity Forms, WooCommerce, or Easy Digital Downloads
View gw-gravity-forms-create-coupons.php
<?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-create-coupon.php
*/
/**
* Gravity Wiz // Gravity Forms // Create Coupons with Gravity Forms for Gravity Forms, WooCommerce, or Easy Digital Downloads
*
* Create coupons via Gravity Forms submissions. Map the coupon code to a field on the GF form and voila!