I love Gravity Forms. It’s the best form building tool for WordPress and now it offers a new feature that allows more complex calculations between fields. Combine that with the PayPal Payments Pro and you have a really fast, simple and powerful ecommerce option for those times when a full WordPress ecommerce system/plugin is not needed. Easier to set up, easier to maintain and gets the job done.
The sample below allows for a variety of shipping prices based on order total (but you could base it on total number of items too). It also adds sales tax – but only if your shipping address is set to California. Of course you could set it to any state. Note that the shipping field disappears when selecting a different state. The key is to set up a “subtotal” field and put your calculations in there.
There are some notes in this form – let me know if you have further questions about how this is set up in the comments below and I’ll do my best to help explain the options. See screenshots at the end of this post.
UPDATE 8/2020: I found this bit of free code from GravityWiz that gives you a ‘subtotal‘ field – I tried it and it works. it is a simpler solution that saves lots of work if you need to edit your form products with any regularity or if you have lots of products.
see also: https://docs.gravityforms.com/gravity-forms-pricing-adding-tax/
UPDATE 4/2014: I have had users ask me for a copy of this form. Here’s a XML export of the form – should be ready to import into your Gravity Forms. Let me know if it helps.
Gravity forms admin screenshots
2020 update: screenshots of GravityWiz ‘subtotal‘ field in a calculation field type. With conditional fields for only applying to California.


9 Comments
Hi – I’d love to know how you’ve done the shipping field !!
Nice form
This is exactly what we are looking for – how did you get the form to calculate a variation in the shipping cost based on the cart subtotal!??? can you send details??
see screenshot for how to make a subtotal – or the update i just added for a shortcut. i’m not sure if this is really documented on the GF website or not.
Do you have screen shots/instructions on how I can get the tax to work? I can’t figure it out to at all.
I just added some screenshots.
Thanks for the screenshots – very helpful.
I think I just spend hours doing something and there’s a faster way – THIS way!
Oh well – never mind 😉
Would you be willing to export and send me a copy of this form? I’ll gladly send you a Paypal donation.
DONE.
Donation Sent. Thank you!