Radio Button Calculations in Adobe LiveCyle Designer ES 4®

This tutorial shows how to leverage radio button values to make forms that can calculate based on user input.  Simple JavaScript concepts like parsing string to numeric values is also covered.

Scripts used in this tutorial:

this.rawValue = parseInt(Question1.rawValue) + parseInt(Question2.rawValue) + parseInt(Question3.rawValue) + parseInt(Question4.rawValue);

Basic JavaScript Looping in Adobe LiveCycle Designer®


A HowTo video on using a JavaScript “for” loop to test and remove instances of repeatable table rows, based on user input.

For a basic understanding of “For” loop syntax, checkout w3schools reference page:  http://www.w3schools.com/js/js_loop_for.asp

Delete Button Code:
 var vRows = Table1._Row1.count-1;
 if(vRows==0){
     Table1._Row1.removeInstance(0);
   } 
 for(var i=vRows;i>=-1;i–){
 if(Table1.resolveNode(“Row1[” + i + “]”).Cell1.rawValue!==1){
     Table1._Row1.removeInstance(i);
  }
 }

Add Button Code:
 Table1._Row1.addInstance();