Gravity Forms Inventory
Easy, flexible inventory management for Gravity Forms.
What does it do?
This plugin provides robust inventory management for Gravity Forms. Use this when selling products or tickets or when creating bookable resources like events, appointments, and reservations!
Just specify the available inventory in your Product field and GF Inventory will handle limiting how much of that item can be ordered. If you’re working with choice-based fields, you can limit how many times each choice can be selected.
Have more complex requirements? With GF Inventory, you can share inventory across multiple fields and forms. Or, group multiple fields together to scope inventory by a unique combination of field values.
Want some practical examples?
Simple Inventory — You’re selling tickets to a conference and only have 50 seats. GF Inventory lets you specify how many seats you have and hide the form or Product field once the inventory is exhausted.
Choice-based Inventory — You’re selling t-shirts with different quantities per size. You have 10 x-large, 20 large, and 15 medium shirts. Use a Drop Down field to display your size options and then use GF Inventory to specify the available inventory per size.
Shared Inventory — You’re selling tickets to a conference (yup, same conference) and want to target unique audiences with different landing pages/forms. GF Inventory lets you share the same inventory across Product fields on each form.
Scoped Inventory — You’re hosting a daily workshop with limited capacity. Use GF Inventory to group a Date field with your Product field. Inventory will be date-specific and dates with no availability can be blocked (via our auto-integration with Limit Dates).
Features
- Easy, flexible inventory management per field.
Supports all Product field types and choice-based fields. - Apply limits to individual choices.
Supports all choice-based fields including Radio Buttons, Checkboxes, Drop Downs, and Multi Selects plus their Product field equivalents. - Share inventory across multiple fields and forms.
Adult/child tickets to the same event? Same product, different forms? Easily configure your fields to share the same inventory. - Scope inventory by grouping related fields together.
Group a Date field and Product field and you can sell tickets to a daily event. That’s just a taste of this powerful feature! - Easily configurable, thoroughly customizable.
Enable with a single click. Create advanced inventories without leaving the form editor. Display available inventory. And so much more! - Developer friendly. Infinitely extensible.
Create dynamic inventory limits and build deep integrations with powerful filters and an open codebase. - Automatic updates.
Get updates and the latest features right in your dashboard. - Legendary support.
We’re here to help! And we mean it.
Documentation
How do I enable this functionality?
After installing and activating Gravity Forms Inventory, inventory controls become available in the field settings for any Product or choice-based field under the “Perks” section.
The following instructions will teach you how to configure “Simple” inventory for both types of fields. See our “Advanced” inventory section to solve more complex inventory requirements.
Product fields
Choice-based fields
Feature Details
Simple Inventory
The Simple inventory type provides a no-frills approach to managing inventory and works effortlessly with both Product fields and choice-based fields like Drop Downs, Radio Buttons, and more.
Simple Inventory for Products
Add a Product field to your form and enable the Simple inventory type. Specify the available inventory for this product directly in the field settings. Each time this product is ordered, the requested quantity will be deducted from your available inventory.
Simple Inventory for Choices
Add a choice-based field to your form and enable the Simple inventory type. Specify the available inventory each choice in your choice-based field directly in the field settings. Each time a choice is selected, the requested quantity will be deducted from that choice’s available inventory.
Advanced Inventory
If you need more robust inventory management like supporting variations (e.g. size, color, date, time), limiting inventory by date or time, or sharing inventory across multiple fields and forms, “Advanced” is the inventory type for you.
Resources
Advanced inventory uses Resources for specifying the inventory amount and behavior. Resources can be shared across multiple fields on the same form or fields on different forms. We call this Shared Inventory. Resources can also be scoped by fields on the same form. We call this Scoped Inventory.
Managing Resources
Resources are managed directly in the Form Editor under the Perks tab. From there, you can select existing Resources, add new Resources, edit, or delete them.
Click Add to add a new resource. Give the new Resource a name and set the inventory level.
Click Edit to edit or delete a resource. Click the Edit button to save any edits to your resource, or click the Delete link to delete the resource.
Scopes
Add scopes to Resources to scope that resource’s inventory by other fields on the same form. This is particularly useful for bookings like events, appointments or meetings. Learn more about Scoped Inventory below.
Add a new scope to a Resource by clicking Add Scope. The scope name entered is for identification only; it does not affect behavior.
After the scopes are added, they must be mapped to the desired fields. Fields with a finite number of possible values (such as choice-based fields) work best for scopes.
Shared Inventory
Shared Inventory allows you to share the same inventory across multiple fields and forms.
For example, Harry Potter is selling tickets to a quidditch match (a wizarding sporting event). Adults and children pay a different price, but the tickets are shared from the same pool.
To handle this, create a Product field for each ticket type. Then enable the Advanced inventory type on both and select the same Resource (you might name it “Tickets”) for each.
Scoped Inventory
Scoped Inventory allows you to group related fields together to scope inventory by a unique combination of field values.
For example, Gandalf the Grey is hosting a daily webinar all about hobbits! He is accepting 30 guests per webinar per day.
To handle this, create a Product field and a Date field. Enable the Advanced inventory type on the Product field and create a Resource named “Webinar Spots”. Specify the available capacity of “30” in the Resources “Inventory” setting, and, lastly, add a scope to that Resource named “Date”. Save the Resource and map your form’s Date field to the “Date” scope that appears under the selected Resource in the Product’s field settings.
Once configured, interested visitors will be able to book a spot in the daily webinar up to the specified capacity for each day.
GF Inventory automatically integrates with GF Limit Dates and will restrict dates that do not have any inventory remaining.
Usage Examples
- How Farbie.at uses GP Inventory to manage over one thousand parties a year
- Spotlight: Scoped Inventory for Simplifying Complex Booking Forms
Exhausted Inventory
Depending on the product you are offering, you may need to control how the form, field, and choices are handled when they are exhausted (go out of stock).
The following options are available:
- Hide form when inventory exhausted
When a field’s inventory reaches0
(or all of its choices do), a message will be displayed instead of the form. This is useful when the form is centered on a specific product. - Hide choice when inventory exhausted
For choice-based fields, when a choice is out of stock, it will be disabled. Use this setting to remove the choice entirely rather than disabling it.
Custom Messages
The following messages can be customized:
Inventory Insufficient Message
Shown when a visitor requests more inventory than what is available.Default:
You requested {requested} of this item but there are only {available} of this item left.
Inventory Exhausted Message
Shown when a field has no remaining inventory.Default:
Sorry, there are no more of this item.
Inventory Available Message
Show the amount of inventory remaining. For choice-based fields, this will be appended to the choice label. For other field types, the message will be appended to the field’s description.Default:
{available} {item|items} available.
A customized message of:
Only {available} of {limit} {ticket|tickets} left!
…would display the following if there were3
tickets available from an original inventory limit of10
:
Only 3 of 10 tickets left!
.
Message Merge Tags
The following merge tags are available in custom messages.
{requested}
Displays the number of requested items when the insufficient inventory message is shown.{available}
Shows the number of inventory remaining. This is parsed in the insufficient inventory message and the inventory available message.{claimed}
Shows the number of inventory used. This is parsed in the insufficient inventory message and the inventory available message.{item|items}
Replace with the singular and plural nouns of the item you’re tracking inventory. For example, use{ticket|tickets}
when selling tickets. This merge tag is limited to the available inventory message.{limit}
Shows the total number of inventory available. This is parsed in the inventory available message.
Conditional Logic
The available number of inventory left can be used to trigger conditional logic. Once inventory is enabled for a field, the (Available) condition becomes available in the field drop down within the conditional logic rules. Use this to show or hide a field if the number of available inventory meets a certain criteria.
This works with non-choice fields, choice-based fields (except Multi Select fields), and scopes. When you select a different choice or scope, the conditional logic will be re-evaluated.
Integrations
Limit Dates
Using Scoped Inventory, any resource that is linked to a Date field that has Limit Dates activated will automatically block dates with no availability.
Populate Anything
Choice limits can be populated with Populate Anything from any supported data source, such as posts, users, and more. For example, you can populate choices from WooCommerce products and populate the stock levels directly into GF Inventory.
Populating the _stock
from WooCommerce doesn’t automatically decrease the stock in the WC product.
QR Code
Gravity Forms QR Code can help you streamline managing inventory between the physical and digital world. For example, generate codes for your product SKUs and scan QR codes to interact with a product on a product management form. Create tickets with QR codes and scan them to check-in attendees. Handling returns, surplus inventory, or restock requests are a few examples of what’s possible.
Invoicing Templates by Gravity PDF
GP Inventory integrates with Gravity PDF’s Invoicing 2.0+ templates. These templates allow for business-ready invoice generation from Gravity Forms submissions. They’re highly customizable, translatable, support conditional logic, and are GST/VAT compatible.
There’s a variety of sleek templates to choose from and all templates integrate with GP eCommerce Fields, GP Advanced Calculations, GP Conditional Pricing, GP Unique ID, and GP Price Range. Learn more about Gravity PDF’s invoicing templates here.
FAQs
How is inventory tracked?
This perk uses the concept of “Inventory Limits” behind the scenes. The Inventory initially set on a product (or choice) defines the limit. Submitted entries then count against the limit.
In the event that you increase the inventory after entries have been submitted, the limit will be raised behind the scenes.
Why are my inventory limits changing in the editor?
By default, GP Inventory shows the current amount of inventory available, not the original inventory limit. If you’re looking to show the inventory limit instead, try out this snippet.
Can inventory limits be shared across fields and/or forms?
Yes! To share inventory limits across fields and forms, use the Advanced inventory type and use the same Resource for the fields that you wish to share inventory. When sharing inventory across choice-based fields, the choice values must be the same.
Can inventory limits be dynamically populated?
Yes!
Without code — Populate Anything enables populating the limit for choices from various data sourcing including posts, users, and more.
With code — The gpi_inventory_limit_advanced and gpi_inventory_limit_simple filters enable setting the limits programmatically. These can be used for robust use-cases including pulling inventory from WooCommerce.
Can I track inventory on a Number field?
Yes. Use the gpi_supported_field_types hook to add support for Number fields.
How can I display available inventory?
You can display the amount of available inventory inline by checking Show available inventory in the Inventory Type field settings:
Displaying Inventory with Shortcode
This handy snippet allows you to show available inventory using shortcode. It also features custom merge tags that let you display:
{label}
– the field (or choice) label.{value}
– the choice value.{available}
– the amount of inventory available.{limit}
– the inventory limit.{count}
– the amount of inventory consumed.
Example of the shortcode using its special merge tags:
[gravityforms action="inventory" id="123" field="4"]{label} - {available} / {limit} available - {count} ordered[/gravityforms]
Product A – 7/10 available – 3 ordered
What happens to inventory if an entry is edited or deleted?
All inventory is entry-based. If you delete or edit an entry to change the requested items/quantities, that item/quantity would automatically be available to another person.
Can I use this to track rented items?
You can! We put together a helpful video that walks you through how to set up a form for tracking rented items.
How does GF Inventory handle the “Processing” order status with the WooCommerce Gravity Forms Add On?
By default, orders with a “Processing” status do not reduce the inventory count in GP Inventory. In the context of Gravity Forms, “Processing” means that the user submitted the form but has not yet completed their payment. Inventory is not reduced until the user completes their payment as there is no guarantee that the payment will ever be completed.
On busy sites, there is the potential for overbooking to occur. If you’d like orders to reduce the inventory count while they are in the “Processing” status, you can add “Processing” to the gpi_approved_payment_statuses filter.
Known Limitations
- Scopes must be reconfigured and resaved after duplicating a form.
- Exporting and importing of resources is not supported.
- If a form is trashed, that form’s entries are still counted towards any shared inventories.
- Solution: Move all of the form’s entries to the trash before you trash the form.
- “Available” conditional logic is not available for Multi Select fields.
- GF Limit Dates Sharing inventory across multiple forms for resources that include a GF-Limit-Dates-enabled Date field as a scope will create performance issues.
- Solution: Limit shared inventory in this context to no more than two forms.
- GF Limit Dates: Multiple scopes are not supported for inventories that are scoped to a GF-Limit-Dates-enabled Date field.
Limit Choices
If you’re switching to GF Inventory from GF Limit Choices, be aware of the following current limitations:
- Daily limits are not supported.
Better Inventory
If you’re switching to GF Inventory from our Better Inventory snippet, here are the following current limitations:
- Sending notifications when inventory is exhausted is not supported.
Translations
You can use the free Loco Translate plugin to create translations for any of our Perks. If you’ve never used Loco translate before, here’s a tutorial written for beginners.
Hooks
- gpi_allow_negative_stock
- gpi_always_show_inventory_limit_in_editor
- gpi_approved_payment_statuses
- gpi_choice_counts
- gpi_choice_input_types
- gpi_choice_inventory_limit
- gpi_claimed_inventory
- gpi_disable_choices
- gpi_field_refreshed (JS)
- gpi_inventory_available_message
- gpi_inventory_exhausted_message
- gpi_inventory_insufficient_message
- gpi_inventory_limit_advanced
- gpi_inventory_limit_simple
- gpi_is_edit_view
- gpi_is_in_stock
- gpi_limit_by_paid_entries_only
- gpi_out_of_stock_message
- gpi_pre_render_choice
- gpi_preserve_values_on_refresh
- gpi_property_map_values
- gpi_quantity_input_ids
- gpi_query
- gpi_remove_choices
- gpi_requested_quantity
- gpi_reset_value_on_property_change
- gpi_resource_post_type_args
- gpi_selected_values
- gpi_supported_field_types
- gpi_supported_input_types
Gravity Forms has hundreds of hooks. Check out our Gravity Forms Hook Reference for the most thorough guide to Gravity Forms’ many actions and filters.
Related Resources
- Guide: Two-Way Connect Gravity Forms with Google Sheets
Learn how to send Gravity Forms data to Google Sheets and populate data from Google Sheets into Gravity Forms, even within the same form. - How Farbie.at uses GP Inventory to manage over one thousand parties a year
Imagine hosting over one thousand parties a year and trying to create a system to manage reservations efficiently. Farbie's solution? GP Inventory. - How to Style Gravity Forms Read-Only Fields
An overview of how to style read-only and disabled fields with CSS. Includes examples of how to target specific field types and different methods of styling. - Spotlight: Scoped Inventory for Simplifying Complex Booking Forms
Two booking forms, separate pricing on each, and date specific pricing on each. See how Kory Richardson made this a cakewalk — and sync'd it all to one external calendar — using Gravity Forms Inventory.