If/Else statement on multiple checkboxes
Hi,
I have a form that has multiple checkboxes. A user can check one or more checkboxes with each checkbox performing a different calculation on the subtotal. I keep getting error on the code below for the first if/else.
var opt=0;
var optValue;
if (fd.field('TaxesDuties').control().el()
.find('input[type="checkbox"]').eq(opt)
.is ('checked') {
optValue= OPT * subTotal;
console.log('OPT: '+optValue);
} else {optValue=0;
}
I have a form that has multiple checkboxes. A user can check one or more checkboxes with each checkbox performing a different calculation on the subtotal. I keep getting error on the code below for the first if/else.
var opt=0;
var optValue;
if (fd.field('TaxesDuties').control().el()
.find('input[type="checkbox"]').eq(opt)
.is ('checked') {
optValue= OPT * subTotal;
console.log('OPT: '+optValue);
} else {optValue=0;
}
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Hello, enillrae!
Can you please specify what error are you getting on execution? Console screenshot would be most helpful.
Can you please specify what error are you getting on execution? Console screenshot would be most helpful.
Cheers
-
- Information
-
Who is online
Users browsing this forum: No registered users and 3 guests