Create product add-ons using Gravity Forms
↑ Volver al principioThis extension requires the Gravity Forms plugin.
Setup and Configuration
↑ Volver al principio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_gforms_strip_meta_html', 'configure_woocommerce_gforms_strip_meta_html' ); | |
function configure_woocommerce_gforms_strip_meta_html( $strip_html ) { | |
$strip_html = false; | |
return $strip_html; | |
} |
Getting Started
↑ Volver al principioGravity Forms Product Add Ons does not change or add anything to the actual configuration of the form itself. The extension will use the form you have already built using the standard method to build a Gravity Form.
To configure the form, do so as though you were creating a form with no connection to WooCommerce.
In the example below, the form is configured to use pricing fields. When using pricing fields, Gravity Forms requires a product and total field. Typically you add a hidden product field to the form and set its price to the price at which you require customizations.
Add a Product field (from the Pricing Fields section) to the form in order to configure the base customization price and set it to $0.00:
Gravity Forms Product Add-On requires that at least one Total field (from the Pricing Fields section) be present on the form. Add a total field to the form. In this example, we are using the built-in dynamic price calculations on our single product page. To prevent the customizations total from being displayed twice on the single product page (once in the dynamically calculated price area and once in the gravity form itself), add a class of “hidden-total” to CSS Class Name under the Appearance tab in the field configuration:
To add options to your form, use the Option field type from Gravity Forms. You can use other controls, such as the standard dropdown, but you must use the option field if your option has a cost associated.
- I recommend adding the form to a temporary post or page, or using the Form Preview to get it working properly.
- Make sure that you submit an entry so you can validate that a regular Gravity Forms submission creates the entry with the correct information
- Once you have the form configured as required, and after it is attached to a product it will be displayed as you require.
Note: If you have options that have a cost associated, you must use the Product Option field type, not standard drop-down fields, radio buttons, checkboxes, etc. This is standard for how Gravity Forms works. If you have trouble creating the product form, Gravity Forms documentation has several good examples.
Once you have built your form and are satisfied with the functionality, create or edit an existing WooCommerce product. Please note that in order for the form to display on the front end, you will need to have either a price or a 0 in the Regular Price field (for more information, see FAQ below).
Select the form you wish to use.
With Gravity Forms Add-On enabled, you have options for linking the form, displaying the Gravity Form title and description, and displaying alternative price titles throughout the store. You also have the ability to control how the dynamically calculated price is displayed on the single product page.
Price Labels
↑ Volver al principioRemove WooCommerce Price
↑ Volver al principioPrice Before
↑ Volver al principioPrice After
↑ Volver al principioTotal Calculations
↑ Volver al principioEnable Dynamic Pricing
↑ Volver al principioDisable Calculations
↑ Volver al principioDisable Subtotal
↑ Volver al principioSubtotal Label
↑ Volver al principioDisable Options Total
↑ Volver al principioOptions Label
↑ Volver al principioDisable Total Label
↑ Volver al principioTotal Label
↑ Volver al principioEntries and Notifications
↑ Volver al principioKeep Cart Entries
↑ Volver al principioUpdate Payment and Transaction Details
↑ Volver al principioSend Notifications
↑ Volver al principioAdvanced Options
↑ Volver al principioEnable Cart Edit
↑ Volver al principioReplace Modified Items
↑ Volver al principioQuantity / Stock Options
↑ Volver al principioWooCommerce Order Information
↑ Volver al principioGravity Form Entry Information
↑ Volver al principioGravity Form Entry Transaction Information
↑ Volver al principioSupported Gravity Form Fields and Features
↑ Volver al principioStandard Fields
- Single Line Text
- Drop Down
- Number
- Radio Buttons
- HTML
- Paragraph Text
- Multi Select
- Checkboxes
- Hidden
- Section Break
Advanced Fields
- Name
- Time
- Address
- Date
- Phone
- Website
- File Upload
- List ( Partial support, the column values are stored in WooCommerce as a CSV list of data, not the raw HTML )
- Product
- Option – Drop Down
- Option – Check-boxes
- Option – Radio buttons
- Total
- Quantity
- Shipping
Forms that are AJAX-enabled are not currently supported with Gravity Forms Product Add-Ons
Quick Tips
↑ Volver al principio- Any license level of Gravity Forms will work with this extension.
- If you are having trouble with a form, calculations or conditional logic, ensure that the form works as expected on a regular post or page. Often times, calculated fields or conditional logic is not configured as expected and it’s easier to track this down when using the gravity form alone and without an attached product.
- Ensure that you avoid using custom confirmation settings on the form. Leave the default confirmation set to text with an empty message.
FAQ
↑ Volver al principioWhat is the best way to use these forms while keeping my website fast?
↑ Volver al principioWhy are duplicate entries created?
↑ Volver al principioWhy won’t Gravity Forms show on the front end?
↑ Volver al principioCan I use Gravity Forms Add-Ons to send emails?
↑ Volver al principioWhy do my forms redirect to a page URL that ends with /:/?
↑ Volver al principioWhy are my Options and Totals not correctly adding costs?
↑ Volver al principioWhy doesn’t this work with the Gravity Forms Partial Entries add-on?
↑ Volver al principioPartial Entries is a 3rd party add-on for Gravity Forms, which collects data for partially completed, but not submitted, forms. Since the actual form entries for Gravity Forms are not important to the WooCommerce cart / order process (see FAQ re: duplicate entries), this add-on is not compatible with our Gravity Forms Product Add-ons extension.