🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms Woo Product Configurator Add-on

Updated 16 min read Gravity Forms Integrations A–Z
On this page
  1. What you need
  2. Quick start
  3. The product page
  4. Which form a product uses
  5. Form settings
  6. Product page
  7. Attach this form
  8. Cart and order lines
  9. Shipping
  10. Notifications and add-on actions
  11. The cart
  12. Editing a cart line
  13. Variable products
  14. Conditional logic by quantity and by variation
  15. Checkout and orders
  16. Order status on the entry
  17. Notification events
  18. Merge tags
  19. Updating from version 1.0
  20. New in version 2.1
  21. A form for a whole category or tag
  22. Products list: Form column, filter and bulk actions
  23. Order again with the same choices
  24. Block cart, block checkout, mini cart and the Store API
  25. Stock used per item
  26. One entry per item
  27. Subscription renewals
  28. Price for search engines
  29. Width and height
  30. For developers (2.1)
  31. For developers
  32. Questions
  33. Does the form work with any theme?
  34. What happens to entries of carts that are never ordered?
  35. Can a customer change the price?
  36. Is any data sent to GravityExtra?

The Gravity Forms Woo Product Configurator Add-On turns a Gravity Form into the add-to-cart form of a WooCommerce product. Your customer chooses options in the form, sees the price change while they choose, and adds the product to the cart with one button. The choices travel with the product: they are shown on the cart line, stored on the order line (order screen and order e-mails) and kept in a Gravity Forms entry that is linked to the order.

A WooCommerce product page where a Gravity Form is the add-to-cart form: shade, gift wrap and engraving choices, and a price box with product price, options and total
The form replaces the add-to-cart button; the price box follows every choice.

What you need

  • WordPress 6.2 or newer and PHP 7.4 or newer.
  • WooCommerce 8.0 or newer (tested with WooCommerce 10.9). The add-on uses the WooCommerce order API only and was tested with the WooCommerce order storage (HPOS) switched on.
  • Gravity Forms 2.5 or newer (tested with 2.9 and 3.1).
  • A Gravity Extra licence key. Enter it under Forms > Settings > Product Configurator. The key unlocks the settings screens and the updates. Products that already use a form keep selling while the key is not active.

Quick start

  1. Build a form in Gravity Forms with the choices you sell: drop-downs, radio buttons, check boxes, text for an engraving, a file upload, and so on. To add a price to a choice, use the Gravity Forms pricing fields (Product, Option, Shipping). A Product field of the type “Hidden” with a price of 0 is the easiest base for Option fields.
  2. Open the WooCommerce product, go to the Product data box and click the tab Product configurator. Choose the form and update the product.
  3. Open the product page. The form appears where the WooCommerce add-to-cart button was, with a price box above its button.

The product needs a price (it may be 0 when the form gives the whole price, see “Cart price” below) and must be in stock, as for any WooCommerce product.

The product page

The form replaces the add-to-cart form of WooCommerce. The WooCommerce quantity box and button are hidden; for a variable product the attribute drop-downs of WooCommerce stay where they are and the form follows them.

A price box sits above the form’s button:

  • Product: the WooCommerce price of the product, or of the chosen variation.
  • Options: the total of the form’s pricing fields, as Gravity Forms counts it (Product, Option and Shipping fields).
  • Total: product + options, times the quantity. It changes while the customer chooses.

The quantity box sits next to the button, unless the quantity comes from a form field. The button shows the WooCommerce text of the product (“Add to cart”), your own text, or “Update cart” when the customer edits a cart line.

When the customer clicks the button, Gravity Forms checks the form as usual (required fields, formats, conditional logic). The add-on then checks the product: the variation must be chosen, the quantity must be 1 or more, and there must be enough stock. When a check fails, the form comes back with a message and nothing is saved. When everything is fine, the entry is saved, the product is added to the cart and the customer goes to the cart (or stays on the product page, see the settings).

On the shop and category pages the button of a product with a form says Choose options and opens the product page. A product with a form cannot be added to the cart without its form (for example with an ?add-to-cart= link): WooCommerce shows “Please choose the options of … on its product page.”

Which form a product uses

Each product can use one form. The add-on looks in this order:

  1. The form chosen in the product’s own Product configurator tab. Choose No form on this product to keep a product without a form even when a rule below would match it.
  2. The first form (lowest form ID) whose Products list names the product.
  3. The first form whose Product categories list has one of the product’s categories.
  4. The first form whose Product tags list has one of the product’s tags.

The tab shows which form is used now and why (“chosen here”, “by category”, “by tag”), with a link to the form. The form settings show the products that use the form now. An inactive or trashed form is never used.

The Product configurator tab in the WooCommerce Product data box: the form used by this product and why
The product tab shows which form is used and where it comes from.

Form settings

Open the form, then Settings > Product Configurator.

Product Configurator form settings: product page, attach this form, cart and order lines, shipping and notification options
Form settings: price mode, attach rules, cart lines, shipping fields and payment-aware notifications.

Product page

  • Cart price: “Product price + form total” (default) or “Form total only (the product price is not added)”. Use the second one when the form gives the whole price; set the WooCommerce price to 0 in that case.
  • Quantity from a field: a Number, Quantity, Drop Down, Radio Buttons, Single Line Text or Hidden field whose value is the cart quantity (a whole number of 1 or more). Leave it empty to show the quantity box.
  • Button text: your own text for the button. Empty = the WooCommerce text of the product.
  • Price text: optional text shown instead of the product price on the product and shop pages, for example From {price}. {price} is the WooCommerce price, {base_price} the plain amount.
  • After adding to the cart: go to the cart, or stay on the product page (WooCommerce shows its “added to your cart” message).
  • Cart editing: show an “Edit” link next to the product name in the cart, or not.

Attach this form

Choose products, product categories and product tags. See “Which form a product uses” for the order.

Cart and order lines

  • Every filled field (default): one line per filled field, label and value, as Gravity Forms shows it (a priced choice shows its price, for example “Brass ($12.00)”). Hidden fields, HTML, sections, page breaks, totals and hidden products are left out.
  • Every filled field except the ones chosen below: the same, without the fields you pick.
  • My own text: one Label: value per line, with merge tags, for example Monogram: {Monogram:3}. Empty lines are dropped.

Shipping

Optional: the weight, length, width and height of the cart line can come from form fields (numbers in the units of your store). WooCommerce then uses them for shipping rates.

Notifications and add-on actions

Choose when the form’s notifications with the event “Form is submitted” are sent and when the feeds of other add-ons run (for example a CRM, an e-mail list or a sheet):

  • When the product is added to the cart (default): as on any form.
  • Only when the order is paid: they wait. When the order becomes Processing or Completed, the add-on sends those notifications and runs those feeds once, with the order known, so order merge tags have values. Entries whose cart never becomes a paid order never reach your CRM or your inbox.

The cart

Each configured product is its own cart line with its own price: product price + options. The lines of text are shown under the product name on the cart, the checkout and the order confirmation page. WooCommerce coupons work as usual and apply to the configured price.

The WooCommerce cart with configured lamps, prints and shirts: each line lists the chosen options and has an Edit link
Each configured cart line lists the choices and has an Edit link.

Editing a cart line

The Edit link opens the product page with the form filled with the saved choices and the quantity. The button says Update cart. After the update the cart has one line with the new choices; the old entry is moved to the trash with a note that names the new entry, and the new entry notes which entry it replaces.

Variable products

The WooCommerce attribute drop-downs stay on the page. When the customer chooses a variation, the price box uses the price of that variation; until a variation is chosen the total says “Choose the options” and the add-on refuses the order line. The cart line keeps the variation and its attributes like any WooCommerce variation.

A variable shirt with the Large size chosen: the Monogram field appears by conditional logic and the price box shows the variation price plus the express option
Conditional logic by variation: the Monogram field shows for the Large size.

Conditional logic by quantity and by variation

Gravity Forms conditional logic works on fields. To show or hide fields by the quantity or the chosen variation, add a Hidden field, open Advanced, tick Allow field to be populated dynamically and type one of these parameter names:

  • gepc_quantity: the quantity (from the quantity box or the quantity field).
  • gepc_variation: the chosen variation as text, for example Large or Large, Blue.
  • gepc_variation_id: the ID of the chosen variation.

The product page keeps these fields up to date while the customer chooses, so rules such as “show Monogram if Chosen size contains Large” or “show Team name if Quantity is greater than 4” work at once. The values are set again on the server when the form is sent, so the saved entry and the server checks use the real quantity and variation.

Checkout and orders

At checkout each configured line becomes an order line with the lines of text as order item meta, so they appear on the order screen, on the order confirmation page and in the WooCommerce order e-mails. The entry is linked to the order and its line:

  • The order screen shows a Form entry # link under each configured line.
  • The entry page shows a WooCommerce box: product, order number (linked), status, quantity, line total and customer.
A WooCommerce order screen: each configured line lists the choices and has a Form entry link
The order keeps the choices of each line and links to its entry.

Order status on the entry

When the order status changes, the entry follows: its payment status (Pending for Pending payment and On hold, Paid for Processing and Completed, Cancelled, Refunded, Failed), the line amount, the payment method, the transaction ID when there is one, the payment date when it is paid, and a note such as “WooCommerce order #1042: Processing (was On hold).”

A Gravity Forms entry with the WooCommerce box: product, order number, status, quantity, line total and customer
The entry follows the order: product, order, status, quantity and line total.

Notification events

Under Notifications, the Event list has these events:

  • Product configurator: added to the cart
  • Product configurator: order paid (once, when the order first becomes Processing or Completed)
  • Product configurator: order completed
  • Product configurator: order on hold
  • Product configurator: order cancelled
  • Product configurator: order refunded
  • Product configurator: order failed

Merge tags

These merge tags are listed under “Product configurator” in the merge tag menu. They have a value once the entry is linked to an order:

  • {woo_order_id}, {woo_order_number}, {woo_order_status}, {woo_order_total}, {woo_order_date}
  • {woo_payment_method}, {woo_transaction_id}
  • {woo_billing_name}, {woo_billing_email}, {woo_billing_phone}, {woo_billing_address}, {woo_shipping_address}
  • {woo_product_name}, {woo_product_sku}, {woo_quantity}, {woo_line_total}
  • {woo_order_admin_url} (the order screen, for staff e-mails)

Example for an “order paid” notification: Order {woo_order_number} for {woo_billing_name}: {woo_product_name} x {woo_quantity}, {woo_line_total}.

Updating from version 1.0

Version 2.0 keeps the plugin folder and the main file of 1.0, so it installs over 1.0 as an update. On the first page load after the update:

  • The form chosen on each product in 1.0 becomes the product’s form in 2.0.
  • Form settings that still have a meaning are carried over: “Item Meta Display” (default, all except, custom template) becomes “Cart and order lines”, the price text becomes “Price text”, the weight and size fields become the “Shipping” fields.
  • The values of 1.0 are kept as they were, nothing is deleted.
  • Orders made with 1.0 keep their order lines; entries linked to an order by 1.0 get the order merge tags and the WooCommerce box too.

An admin notice says how many products and forms were carried over. Products keep selling right after the update. Activate the licence key to change settings and get updates.

Not carried over by version 2.0: the product image from a field. The structured data price override, the “entry per quantity” mode and the renewal entries of subscription orders came back in version 2.1 as new settings (see New in version 2.1); they are off until you choose them.

New in version 2.1

Version 2.1 adds the settings below. Each one is off until you change it, so products and forms you set up with version 2.0 work exactly as before after the update. Nothing that version 2.0 stored is read again or changed by the update. The new settings and screens need an active licence key.

A form for a whole category or tag

Open Products → Categories (or Tags), edit a category and choose a form under Product configurator form. Every product in that category uses the form, unless the product has its own choice. You can also choose No form to keep the products of a category without a form, even when a form lists that category in its settings.

The order in which a product finds its form is: the form chosen on the product itself, a form whose product list names the product, the form chosen on one of its categories, the category lists of the forms, the form chosen on one of its tags, and the tag lists of the forms. When a product is in two categories with a form, the lowest form ID is used. The categories list shows the chosen form in a Form column.

The WooCommerce Edit category screen with the Product configurator form field set to the Print options form
Version 2.1: choose a form for a whole category or tag.

Products list: Form column, filter and bulk actions

Products → All Products has a Form column with the form each product uses now and how it was found (chosen on the product, on its category, by a form’s category list, and so on). The filter above the list shows the products that use one form, the products with a form, or the products without one. Tick products and use the bulk actions Form: <form title>, Form: use the form rules or Form: no form to set the form of many products at once; this is the same setting as the Product configurator tab of each product.

The WooCommerce Products list with the Form column, the filter by form and the bulk actions to set a form
Version 2.1: Form column, filter by form and bulk actions in the Products list.

Order again with the same choices

When a customer clicks Order again on a completed order in My Account, products without a form go back into the cart as usual. A configured line is not copied blindly: the cart shows a link for each configured product, and the link opens the product page with the form filled in with the choices and the quantity of that order line (and the same variation). The customer can change anything and adds the product with the normal button. Today’s prices, stock and checks apply, and a new entry is saved. The link only works for the customer who placed the order.

The WooCommerce cart after Order again: the plain mug is back in the cart and each configured product has a link that opens its form with the previous choices
Version 2.1: Order again opens each configured product with the previous choices.

Block cart, block checkout, mini cart and the Store API

The choices of a configured line are shown in the cart block, the checkout block (order summary) and the mini cart block, and an order placed with the checkout block keeps them on the order line, with the entry linked, as the classic checkout does.

The WooCommerce cart block showing a configured desk lamp with its shade and engraving choices under the product name
Version 2.1: the choices show in the cart block, the checkout block and the mini cart.

For a headless shop or your own JavaScript, the WooCommerce Store API knows the configurator:

  • GET /wp-json/wc/store/v1/products/<id>: under extensions.gravityextra-product-configurator you get form_id, price_mode, quantity_field and the fields of the form (id, type, label, required, inputs, choices with their price, conditional logic). A product without a form returns form_id 0.
  • POST /wp-json/wc/store/v1/cart/extensions with {"namespace": "gravityextra-product-configurator", "data": {"product_id": 13, "quantity": 2, "fields": {"2": "Brass", "3.1": "Gift wrap", "4": "For Mia"}}} adds a configured product. For a variable product add variation_id and variation ([{"attribute": "pa_size", "value": "large"}]). The values go through the same Gravity Forms submission as the product page: required fields, conditional logic, the variation, quantity and stock checks, and the price from the form’s own choices (a price sent with a value is ignored; an unknown choice is refused). The answer is the cart. A refused request answers with an error and a fields list of the field messages.
  • Each cart item has extensions.gravityextra-product-configurator with entry_id, form_id and edit_url (the product page that opens the form with the saved choices, empty when cart editing is off). The choices themselves are in the usual item_data.
  • A plain POST /cart/add-item of a product with a form is refused, like ?add-to-cart= links.

Send the usual Store API Nonce or Cart-Token header. File upload fields cannot be sent as JSON; use the product page for forms that need a file.

Stock used per item

For products sold by length or weight, choose a number field under Form Settings → Product Configurator → Stock, entries and search engines → Stock used per item. The product stock then goes down by quantity × the value of that field: 2 pieces of 2.5 m take 5 m. The check on the product page uses the same amount (“Sorry, there are not enough … in stock (20 left)”), and so do the cart check, the stock held for unpaid orders and the stock given back when an order is cancelled. When the store counts whole units (the WooCommerce default), the amount is rounded up. If you change the quantity of such a line on the order screen, the stock is not adjusted automatically; adjust it by hand.

A linen fabric product page with a Metres per piece field, hem and label choices and the live price box; the metres per piece set how much stock each item uses
Version 2.1: stock used per item from a form field.

One entry per item

Choose One entry per item under Entries for a quantity of more than 1 when each item needs its own entry, for example one name badge per ticket. When the order is placed, a line of quantity 3 has its own entry plus two copies, each linked to the same order line, each with the amount of one item. The copies follow the order status; they send no notification and run no add-on, so you get one notification per line as before.

Subscription renewals

With WooCommerce Subscriptions active, a Subscription renewals choice appears. With A new entry for each renewal order, each renewal order line gets its own entry, a copy of the first one, linked to the renewal order, so the entry of the first order keeps the status of the first order and every renewal has its own record and its own “order paid” event. Left at the default, a renewal order line points to the first entry, as in version 2.0.

Note: Requires WooCommerce Subscriptions. We tested renewal entries with renewal orders built the way WooCommerce Subscriptions builds them; please try one renewal on a staging copy of your shop before you rely on it.

Price for search engines

WooCommerce puts the product price in the structured data that search engines read. For a configured product the real price is often higher. Under Price for search engines choose A fixed price (for example 59) or A price range (for example 40 to 129); the product structured data then shows that price or that range instead of the base price. Products without a form are not changed.

The Stock, entries and search engines settings: stock used per item from the Metres per piece field, one entry per item, and the price for search engines
Version 2.1: stock, entries and search engine price settings.

Width and height

The weight, length, width and height of a cart line can all come from form fields (Shipping section of the form settings); since version 2.1 all four are covered by our tests.

For developers (2.1)

New entry meta: gepc_copies (copies of an entry, one entry per item), gepc_copy_of, gepc_renewal_of, gepc_order_prev (the order an entry was linked to before). New hidden order item meta: _gepc_stock_units. The forms chosen on category and tag screens are kept in the option gepc_term_forms. The filter gepc_product_form also reports term-category and term-tag in by.

For developers

  • gepc_product_form (filter): the form of a product, array( 'form' => id, 'by' => how ), and the product ID.
  • gepc_unit_price (filter): the unit price of a configured cart line, the cart item and the product price.
  • gepc_item_lines (filter): the lines of a cart / order line, the form and the entry.
  • gepc_supports_product_type (filter): allow another product type than simple and variable.
  • gepc_added_to_cart (action): entry, form and cart item key after an add to cart.
  • gepc_order_status (action): entry, form, order, old and new status after a status change.
  • gepc_released (action): entry and form after the held notifications and feeds ran.

Entry meta keys: gepc_order_id, gepc_order_item_id, gepc_order_status, gepc_product_id. Order item meta (hidden): _gepc_entry_id, _gepc_form_id.

Questions

Does the form work with any theme?

The form is printed by the WooCommerce hook after the add-to-cart form, which classic themes and the WooCommerce product templates use. It was tested with a classic theme and the classic cart and checkout pages.

What happens to entries of carts that are never ordered?

They stay in Gravity Forms without an order (the WooCommerce box says “Not ordered yet”). Use “Only when the order is paid” if your notifications and other add-ons should only see paid orders.

Can a customer change the price?

No. The price box is only a preview. The cart price is computed on the server from the saved entry and the current product price, every time the cart is totalled.

Is any data sent to GravityExtra?

No customer or order data leaves your site. The add-on only contacts gravityextra.com to check the licence key and for updates.

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr