If/Else statement on multiple checkboxes

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
enillrae
Posts: 17
Joined: Mon May 29, 2017

06 Jul 2017

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;
}

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

06 Jul 2017

Hello, enillrae!
Can you please specify what error are you getting on execution? Console screenshot would be most helpful.
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests