Sync Field Max to WooCommerce Quantity
Sync a field’s max to the max of the WooCommerce product’s quantity input. Works with Variable Products.
Instructions
- Install our free Gravity Forms Code Chest plugin.
Download the plugin here: https://gravitywiz.com/gravity-forms-code-chest/
- Copy and paste the snippet into the “JavaScript” setting under the Code Chest form settings subview.
- Add “sync-max-to-quantity” to the Custom CSS Class setting of the fields you want to sync the max.
Code
Filename: gspc-sync-field-max-to-wc-quantity.js