Skip to main content
Participant
March 20, 2023
Question

I need a tax exempt box to remove my simple calcluation for tax.

  • March 20, 2023
  • 1 reply
  • 994 views

I am working on my first Form and I have entered a simplified field notation to get the tax rate after adding sub total and shipping.  However, I need a box for exempt that will remove that calculation if necesary. Any help is appreciated.

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
March 20, 2023

You need a custom script for that:

var tax = this.getField("Exempt").valueAsString;
var sub = Number(this.getField("subtotal").valueAsString);
var sh = Number(this.getField("sh").valueAsString);

if(tax == "Off"){
if(sub&&sh)
event.value = (sub+sh)*0.775;
else
event.value = 0;}
else
event.value = 0;

 

Just make sure to change field calculation order afterwards.

Participant
March 20, 2023
Awesome thank you.!

[cid:eefa9258-23c1-45e7-9a8f-1c2845400afe]