Create product add-ons using Gravity Forms
↑ Voltar Para o TopoThis extension requires the Gravity Forms plugin.
Setup and Configuration
↑ Voltar Para o Topo
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
↑ Voltar Para o TopoGravity 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
↑ Voltar Para o TopoRemove WooCommerce Price
↑ Voltar Para o TopoPrice Before
↑ Voltar Para o TopoPrice After
↑ Voltar Para o TopoTotal Calculations
↑ Voltar Para o TopoEnable Dynamic Pricing
↑ Voltar Para o TopoDisable Calculations
↑ Voltar Para o TopoDisable Subtotal
↑ Voltar Para o TopoSubtotal Label
↑ Voltar Para o TopoDisable Options Total
↑ Voltar Para o TopoOptions Label
↑ Voltar Para o TopoDisable Total Label
↑ Voltar Para o TopoTotal Label
↑ Voltar Para o TopoEntries and Notifications
↑ Voltar Para o TopoKeep Cart Entries
↑ Voltar Para o TopoUpdate Payment and Transaction Details
↑ Voltar Para o TopoSend Notifications
↑ Voltar Para o TopoAdvanced Options
↑ Voltar Para o TopoEnable Cart Edit
↑ Voltar Para o TopoReplace Modified Items
↑ Voltar Para o TopoQuantity / Stock Options
↑ Voltar Para o TopoWooCommerce Order Information
↑ Voltar Para o TopoGravity Form Entry Information
↑ Voltar Para o TopoGravity Form Entry Transaction Information
↑ Voltar Para o TopoSupported Gravity Form Fields and Features
↑ Voltar Para o TopoStandard 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
↑ Voltar Para o Topo- 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
↑ Voltar Para o TopoWhat is the best way to use these forms while keeping my website fast?
↑ Voltar Para o TopoWhy are duplicate entries created?
↑ Voltar Para o TopoWhy won’t Gravity Forms show on the front end?
↑ Voltar Para o TopoCan I use Gravity Forms Add-Ons to send emails?
↑ Voltar Para o TopoWhy do my forms redirect to a page URL that ends with /:/?
↑ Voltar Para o TopoWhy are my Options and Totals not correctly adding costs?
↑ Voltar Para o TopoWhy doesn’t this work with the Gravity Forms Partial Entries add-on?
↑ Voltar Para o TopoPartial 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.