Hello!
I have taken old code of mine from several forms and tried to wire it into my current form with little success. I'm having several issues that I'll describe below. Also, I'm happy to share the form but didn't see a way to upload a file. How is that usually handled?
- I have simple math A+B=C in my dynamic table. The calcuate event works in FormCalc but not in JavaScript
- I need to also perform a grand total on this table but I can't get it to work. Like I said, I borrowed this code from another form so I'm guessing that's where my issue is coming from. Here's my calculate event script:
nodesLength = form1.itemsList.instanceManager.count; // Get the number of instances
this.rawValue = ""; // reset the grand total amount back to zero
for (var i = 0; i < nodesLength; i++) // loop through all the instances
{
nIndex = i;
sSOM = "itemsList[" + nIndex + "]";
oSubform = xfa.resolveNode(sSOM); this.rawValue = this.rawValue + oSubform.totalCost.rawValue; // Sum all the "totalCost" fields in the "grandTotal" field } - I have a radio button let's call it item 22. When Yes is selected sub items A-J need ot appear. I have this working but can't figure out how to make it such that when No is selected items A-J disappear as does the white space they take up. Thanks so much in advance for your help. I actually will be leaving this position on Thursday for a new job and am trying to get as much done before I leave as possible. Regards, Saskia