Copy link to clipboard
Copied
I have a form with radio buttons and a total.
When you select certain buttons the price is totalled in a 'Total' field box..
There is one radio button 'Withdrawal' that if clicked, the total price in the 'total' field needs to increase by 6.9%
I've tried adding code to 'Total' the extra 6.9% if the radio button 'Withdrawal' is selected. No Luck
I've tried adding code to ''Withdrawal' radion button to incrase the 'Total' by 6.9% if selected. No Luck
PDF ATTACHED!
Copy link to clipboard
Copied
Use this as custom calculation script in "Total" field, it will calculate all checkboxes and add 6.9% increase if withdrawal is checked:
var fields = [
"MarketingPackageA",
"MarketingPackageB",
"MarketingPackageC",
"Audience Maximiser",
"Photo For Sale Sign",
"Sunset Photoshoot",
"Be Seen Social Media",
"Auctioneer’s Fee",
"Body Corporate Disclosure Statement",
"Title Search"
];
var per = 1.069;
var total = 0;
for(var i=0; i<fields.length; i++){
var f = this.getField(fields[i]).valueAsString;
if(f !== "Off")
total += Number(f);}
if(this.getField("Withdrawal").valueAsString !== "Off")
total = total*per;
event.value = total.toFixed(2);
Copy link to clipboard
Copied
Use this as custom calculation script in "Total" field, it will calculate all checkboxes and add 6.9% increase if withdrawal is checked:
var fields = [
"MarketingPackageA",
"MarketingPackageB",
"MarketingPackageC",
"Audience Maximiser",
"Photo For Sale Sign",
"Sunset Photoshoot",
"Be Seen Social Media",
"Auctioneer’s Fee",
"Body Corporate Disclosure Statement",
"Title Search"
];
var per = 1.069;
var total = 0;
for(var i=0; i<fields.length; i++){
var f = this.getField(fields[i]).valueAsString;
if(f !== "Off")
total += Number(f);}
if(this.getField("Withdrawal").valueAsString !== "Off")
total = total*per;
event.value = total.toFixed(2);
Copy link to clipboard
Copied
OMG It worked! You are amazing! Thank you so much.