Skip to content

Instantly share code, notes, and snippets.

@scyt
scyt / gw-gravity-forms-rename-uploaded-files-usage.php
Last active September 3, 2019 14:42 — forked from spivurno/gw-gravity-forms-rename-uploaded-files-usage.php
Gravity Wiz // Gravity Forms // Rename Uploaded Files
<?php
# First and Last Name
new GW_Rename_Uploaded_Files( array(
'form_id' => 628,
'field_id' => 3,
'template' => '{Name (First):1.3}-{Name (Last):1.6}-{filename}' // most merge tags are supported, original file extension is preserved
) );
# Form Title Merge Tag
@scyt
scyt / gw-gravity-forms-product-count.php
Last active August 7, 2019 20:43 — forked from spivurno/gw-gravity-forms-product-count.php
Gravity Wiz // Gravity Forms // Product Count
<?php
/**
* Gravity Wiz // Gravity Forms // Product Count
*
* Get the total number of products selected. Particularly useful in combination with the GP Conditional Pricing
* perk to create pricing rules based on product count.
*
* @version 1.0
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+