PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Adding tax percentage to Total

  1. Has anyone successfully written an API hook or JQuery string that they'd be willing to share to add tax percentage to the total field (or particular fields) in a form?

    That would be EXTREMELY helpful!! THANKS!

    Posted 13 years ago on Wednesday April 20, 2011 | Permalink
  2. I believe this thread might have some useful information:

    http://www.gravityhelp.com/forums/topic/paypal-add-on-and-taxes

    If that isn't what you're looking for, than this snippet might helpful:

    http://www.gravityhelp.com/forums/topic/add-surcharge-to-the-total-on-form

    Posted 13 years ago on Wednesday April 20, 2011 | Permalink
  3. Thanks for the input! but unfortunately I can't get that to work with my form. I can get the code inserted, changed the variables, and the 'user defined' box still shows up as $0.00 when submitted. Does it have to work in conjunction with paypal?

    I really don't need Paypal to handle anything, I'm just gathering data for an order that will need to be reviewed and then processed offline with CCard info that is already on file. But, I need to give the client a total when they submit so they know how much their card is going to be charged, tax included.

    http://www.speedypost.net/order-form if anyone has time to see what I'm building.

    Posted 13 years ago on Wednesday April 20, 2011 | Permalink
  4. Hi Charles,

    It does not rely on PayPal to work, only the GF Pricing Fields. I went back through the script on my end and everything is working. I looked at your script and didn't see any javascript errors, so assuming you followed all the directions it should be working.

    Could you give it another go and confirm that you have everything set up per the instructions in this post:

    http://www.gravityhelp.com/forums/topic/add-surcharge-to-the-total-on-form#post-21670

    Posted 13 years ago on Wednesday April 20, 2011 | Permalink
  5. Hi Charles

    Thanks for this snippet of code.

    When I click the submit button after implementing this code, it does add a surcharge to the form.

    However, if there is a required field not filled in and I click the button, it adds a surcharge to the total. If I continue to click the submit button, it adds a second, third, etc amount of surcharge.

    Any way around this?

    Thanks

    Posted 12 years ago on Sunday May 15, 2011 | Permalink
  6. Try this updated code: http://pastie.org/1912751

    Posted 12 years ago on Monday May 16, 2011 | Permalink
  7. I have a form here:
    http://remingtontopsoil.com/order-online

    This is used for cash or check orders only. I'm not using PayPal for this form. I need to add VA sales tax to the form. I need the tax to display before the Order total.

    I followed the directions given here:
    http://www.gravityhelp.com/forums/topic/add-surcharge-to-the-total-on-form#post-21670

    However, the tax doesn't display. I don't see it included in the email I receive with the order. Is there another way to add a tax field to the form and have it display and be added in the Order Total before pressing the "Submit" button?

    Thanks for your assistance.

    Posted 12 years ago on Monday August 15, 2011 | Permalink
  8. Here is additional custom code you could try that adds a surcharge. This example added a percentage and a set fee to the total.

    http://pastie.org/2102201

    Currently there is no Tax Field. Gravity Forms isn't designed to replace a full shopping cart ecommerce system and is only intended for more simple implementations and order forms that aren't complex. It can be customized to be more complex, but it wasn't intended to be a full featured ecommerce solution.

    Posted 12 years ago on Monday August 15, 2011 | Permalink
  9. Carl,

    Thanks for your quick response. I followed these steps from David Smith's instructions to another user:

    1. Add this code to your theme's functions.php file: http://pastie.org/1722092
    2. On the first line of the code, update the '45' to the ID of your form
    3. Go to your form admin and add a new product field to your form. Select "User Defined Price"as the field type and specify 'surcharge' as the CSS class. http://grab.by/9I23 http://grab.by/9I24
    4. Make sure your form has a total field.

    I added a new product field with user defined with CSS: surcharge, gform_hidden. Since I can't set it to calculate 5% sales tax, I want it hidden on the form.

    When I fill out the form, this tax/surcharge doesn't appear on the email that I receive when I fill out the form. I have the order total but it doesn't include the 5% VA sales tax.

    I'm not trying to use gravity forms for e-commerce. I have e-commerce on my site using PayPal and e-junkie. However I have customers that prefer to pay with cash or check. So I purchased gravity forms since it had the pricing fields and order total capability, to accommodate these customers. So this online form will be used only by customers placing a cash or check order.

    Posted 12 years ago on Monday August 15, 2011 | Permalink
  10. Carl,

    I tried this code:

    http://pastie.org/2102201

    It works!! Thanks so much for the assistance.

    Posted 12 years ago on Tuesday August 16, 2011 | Permalink

This topic has been resolved and has been closed to new replies.