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.

Add Tax or GST to total OR live update of Enable Calculation

  1. Bobby
    Member

    I know there has been posts before, but i cant quite seem to get this to work.
    What i want to do, is either add 10% to the Total Cost on the fly OR have a GST component displayed as a number field with calculation.

    Currently i have a number field with calculation displaying the GST but it only seems to update on submit if I have {Total Report Cost:40}*.1, but if i use the products ie {product pear:61}*.1 the value is updated live.

    If anyone could give me a tip, would prefer the Total cost to have added 10% on the fly, but if thats too hard then the number field updated live based on Total would be great.

    Cheers.

    Posted 11 years ago on Friday July 6, 2012 | Permalink
  2. The best way to show the Tax and have it update the Total is on the Tax field - make that a calculation product field. Then add all of your products together with merge tags and then multiply it by the number. So your tax calculation field would look something like:

    (MergeTag1 + MergeTag2 + MergeTag3) * .1

    You may also need to factor in quantities too, but I'm not sure since I don't have a link to your form at the moment.

    Posted 11 years ago on Friday July 6, 2012 | Permalink
  3. Bobby
    Member

    Hi Rob,

    thanks for that, much appreciated, I got it to work in the calculation field doing that, now the only issue is it doesn't show a currency symbol before it, and I have already tried this http://gravitywiz.com/2012/05/24/format-field-as-currency/ in the php but that wont work. Is there anyway the Total field can take the tax element and ad it together so its one price?

    Posted 11 years ago on Saturday July 7, 2012 | Permalink
  4. Do the calculation as a Product Field -> Type Calculation instead. I'm flying blind here without seeing your form...

    Posted 11 years ago on Saturday July 7, 2012 | Permalink
  5. storymanager
    Member

    My tax (using Product->Calculation field) is not being sent to PayPal.

    Here's my formula:
    http://pastie.org/4414894

    I'm also using the gform_pre_render_3 hook to add tax to the total on-the-fly, but paypal reflects the total without tax:
    http://pastie.org/4414887

    What am I missing?

    Mahalo for your insight!

    Posted 11 years ago on Wednesday August 8, 2012 | Permalink