Gravity Perks
Gravity Connect
Gravity Shop
Snippet Library
Blog
Account
Black Magic
Black Friday Sale
•
Basic
10%
,
Advanced
25%
,
Pro
50%
off
•
Starts Monday, Nov 25th
Gravity Wiz
Gravity Perks
Gravity Perks
A suite of 46+ Gravity Forms addons
Product Details
Pricing
Documentation
Gravity Connect
Gravity Connect
Connect Gravity Forms to top-shelf services
Product Details
Pricing
Documentation
Gravity Shop
Gravity Shop
Bridging Gravity Forms & WooCommerce
Product Details
Pricing
Documentation
Snippet Library
Blog
Account
Log In
Support
Menu
Snippets
Inventory
Snippet Library
/
Inventory
php
WPML Support for Custom Inventory Messages
php
Dynamic Scopes for Combo Inventories
Imagine a form with two Drop Down fields with available time slots. One Time Slot field is for a Standard...
php
Add Number as a Supported Field Type
php
Grant Additional Inventory by Role
php
Disable Inventory for a Form After a Specific Date
php
Capture Resource Name (as Field Value)
If you intend to map different Resources to different fields throughout the life of your form, you may wish to...
php
Disable Inventory Limits for Admins
php
Inventory Limit Exceptions
php
Hide Form if Preselected Choice is Exhausted
This snippet allows you to hide the form if you're using dynamic population to preselect a choice and that choice's...
php
Inventory Shortcode
Update "123" to your form ID and "4" to your field ID with inventory. [gravityforms action="inventory" id="123" field="4"] If using...
php
Limit by Field Value Match
Only count an entry towards the inventory limit if a specific field matches a specific value.
php
Limit by Approved Entries Only
When using GravityView, only count "Approved" entries towards the inventory limit.
php
Only Show Next n Available Choices
Use this snippet to only show the next n choices available (defaults to the next three). For example, you could...
php
Limit by Gravity Flow Approved Entries Only
When using Gravity Flow with an "Approval" step, only count "Approved" entries towards the inventory limit.
php
Populate Total Available Inventory Across Choices
Use this snippet to populate the total available inventory across all choices for a given field.
php
Inventory Limit by Day of the Week
Set different inventory amounts depending on the day of the week selected in a scoped Date field. This snippet is...
php
Set Inventory Limit by Custom Field
This filter sets the inventory of an Advanced resource dynamically based on the inventory custom field of the post/page on...
php
Set Requested Inventory by Field Value
php
Display Simple Inventory Type Current/Remaining Inventory
php
Shared Choices
Share limits across choices in the same field.
php
Show Inventory Limit in Form Editor
By default the current inventory is shown in the form editor. Use this filter to show the inventory limit.
php
Waiting List for Exhausted Choices
Replace the default available inventory message with a waiting list message when a product's (or choice's) inventory is exhausted. Choices...
php
Sold Out Message
Display a "Sold Out" message when a choices inventory has been exhausted.
php
Weighted Inventory
Apply a custom inventory weight to a field such that it consumes additional inventory per requested item.