HELP! Adding spacing to text populating to a single text box from multiple other check and text boxes.

Community Beginner ,
Feb 22, 2019

Copy link to clipboard

Copied

Hi,

I have a javascript already that is populating multiple check boxes and text boxes to a single summary text box and it is working great so far! The only issue I have is that when it all populates to the to the single summary text box it is one thing right after another separated only by commas.  It's hard to delineate where the related information starts and begins. Is there any way to put a like a "spacer line" to separate out the info to make it easier to read?  I have highlighted the related information that needs to be grouped together. I need a space to appear between each other these Colors when it populated to the summary text box. Any help is greatly appreciated...Thank you in advance.  Here is the Java script as it is now:

var values = []; 

for (var i=293; i<=306; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("A Shoulder Findings").valueAsString!="") values.push("A Shld Find: " + this.getField("A Shoulder Findings").valueAsString);

if (this.getField("Specific Shoulder Orthos").valueAsString!="") values.push("Specific Shld Othos: " + this.getField("Specific Shoulder Orthos").valueAsString);

 

for (var i=307; i<=316; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("A Elbow Findings").valueAsString!="") values.push("A Elbow Find: " + this.getField("A Elbow Findings").valueAsString);

if (this.getField("Specific Elbow Orthos").valueAsString!="") values.push("Specific Elbow Orthos: " + this.getField("Specific Elbow Orthos").valueAsString);

for (var i=317; i<=326; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("A Wrist Findings").valueAsString!="") values.push("A Wrist Find: " + this.getField("A Wrist Findings").valueAsString);

if (this.getField("Wrist Specific Orthos").valueAsString!="") values.push("Specific Wrist Orthos: " + this.getField("Wrist Specific Orthos").valueAsString);

for (var i=327; i<=340; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("P Shoulder Findings").valueAsString!="") values.push("P Shoulder Find: " + this.getField("P Shoulder Findings").valueAsString);

for (var i=341; i<=350; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("P Elbow Findings").valueAsString!="") values.push("P Elbow Find: " + this.getField("P Elbow Findings").valueAsString);

for (var i=351; i<=360; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("P Wrist Findings").valueAsString!="") values.push("P Wrist Find: " + this.getField("P Wrist Findings").valueAsString);

for (var i=361; i<=374; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("A Hip Findings").valueAsString!="") values.push("A Hip Find: " + this.getField("A Hip Findings").valueAsString);

if (this.getField("Specific Hip Orthos").valueAsString!="") values.push("Specific Hip Orthos: " + this.getField("Specific Hip Orthos").valueAsString);

for (var i=375; i<=384; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("A Knee Findings").valueAsString!="") values.push("A Knee Find: " + this.getField("A Knee Findings").valueAsString);

if (this.getField("Specific Knee Orthos").valueAsString!="") values.push("Specific Knee Orthos: " + this.getField("Specific Knee Orthos").valueAsString);

for (var i=385; i<=394; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("A Ankle Findings").valueAsString!="") values.push("A Ankle Find: " + this.getField("A Ankle Findings").valueAsString);

if (this.getField("Specific Ankle Orthos").valueAsString!="") values.push("Specific Ankle Orthos: " + this.getField("Specific Ankle Orthos").valueAsString);

for (var i=395; i<=408; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("P Hip Findings").valueAsString!="") values.push("P Hip Find: " + this.getField("P Hip Findings").valueAsString);

for (var i=409; i<=418; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("P Knee Findings").valueAsString!="") values.push("P Knee Find: " + this.getField("P Knee Findings").valueAsString);

for (var i=419; i<=428; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("P Ankle Findings").valueAsString!="") values.push("P Ankle Find: " + this.getField("P Ankle Findings").valueAsString);

for (var i=429; i<=431; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocMax CC").valueAsString!="") values.push("Max CC Findings: " + this.getField("LocMax CC").valueAsString);

for (var i=432; i<=434; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocCerv Comp").valueAsString!="") values.push("Cerv Comp Findings: " + this.getField("LocCerv Comp").valueAsString);

for (var i=435; i<=437; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocCerv Dist").valueAsString!="") values.push("Cerv Dist Findings: " + this.getField("LocCerv Dist").valueAsString);

for (var i=438; i<=440; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocJacksons").valueAsString!="") values.push("Jacksons Findings: " + this.getField("LocJacksons").valueAsString);

for (var i=441; i<=443; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocRt Rot Comp").valueAsString!="") values.push("Rt Rot Comp Findings: " + this.getField("LocRt Rot Comp").valueAsString);

for (var i=444; i<=446; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocLt Rot Comp").valueAsString!="") values.push("Lt Rot Comp Findings: " + this.getField("LocLt Rot Comp").valueAsString);

for (var i=447; i<=449; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocShld Depr").valueAsString!="") values.push("Shld Depr Findings: " + this.getField("LocShld Depr").valueAsString);

for (var i=450; i<=452; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocRev Bak").valueAsString!="") values.push("Rev Bak Findings: " + this.getField("LocRev Bak").valueAsString);

for (var i=453; i<=455; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocEdens").valueAsString!="") values.push("Edens Findings: " + this.getField("LocEdens").valueAsString);

for (var i=456; i<=458; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocValsalvas").valueAsString!="") values.push("Valsalvas Findings: " + this.getField("LocValsalvas").valueAsString);

for (var i=459; i<=461; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocSLRBrSiTu").valueAsString!="") values.push("SLRBrSiTu Findings: " + this.getField("LocSLRBrSiTu").valueAsString);

for (var i=462; i<=464; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocKemps").valueAsString!="") values.push("Kemps Findings: " + this.getField("LocKemps").valueAsString);

for (var i=465; i<=467; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocHeel Walk").valueAsString!="") values.push("Heel Walk Findings: " + this.getField("LocHeel Walk").valueAsString);

for (var i=468; i<=470; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocToe Walk").valueAsString!="") values.push("Toe Walk Findings: " + this.getField("LocToe Walk").valueAsString);

for (var i=471; i<=473; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocNachlasEly").valueAsString!="") values.push("Nachlas/Ely Findings: " + this.getField("LocNachlasEly").valueAsString);

for (var i=474; i<=476; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocGaenslins").valueAsString!="") values.push("Gaenslins Findings: " + this.getField("LocGaenslins").valueAsString);

for (var i=477; i<=479; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocMaziones").valueAsString!="") values.push("Maziones Findings: " + this.getField("LocMaziones").valueAsString);

for (var i=480; i<=482; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocCozR Coz").valueAsString!="") values.push("Coz/R Coz Findings: " + this.getField("LocCozR Coz").valueAsString);

for (var i=483; i<=485; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocPhalR Phal").valueAsString!="") values.push("Phal/R Phal Findings: " + this.getField("LocPhalR Phal").valueAsString);

for (var i=486; i<=488; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocScouring Hip").valueAsString!="") values.push("Hip Scouring Findings: " + this.getField("LocScouring Hip").valueAsString);

for (var i=489; i<=491; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocFabers").valueAsString!="") values.push("Fabers Findings: " + this.getField("LocFabers").valueAsString);

for (var i=492; i<=494; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocMcMurrys").valueAsString!="") values.push("McMurrys Findings: " + this.getField("LocMcMurrys").valueAsString);

for (var i=495; i<=497; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocMITLIT").valueAsString!="") values.push("MIT/LIT Findings: " + this.getField("LocMITLIT").valueAsString);

for (var i=498; i<=500; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocTinnels").valueAsString!="") values.push("Tinnels Findings: " + this.getField("LocTinnels").valueAsString);

if (this.getField("LtC4 UT").valueAsString!="") values.push("Musc Lt C4: " + this.getField("LtC4 UT").valueAsString);

if (this.getField("RtC4 UT").valueAsString!="") values.push("Musc Rt C4: " + this.getField("RtC4 UT").valueAsString);

if (this.getField("LtC5 D Bic").valueAsString!="") values.push("Musc Lt C5: " + this.getField("LtC5 D Bic").valueAsString);

if (this.getField("RtC5 D Bic").valueAsString!="") values.push("Musc Rt C5: " + this.getField("RtC5 D Bic").valueAsString);

if (this.getField("LtC6 BR WE").valueAsString!="") values.push("Musc Lt C6: " + this.getField("LtC6 BR WE").valueAsString);

if (this.getField("RtC6 BR WE").valueAsString!="") values.push("Musc Rt C6: " + this.getField("RtC6 BR WE").valueAsString);

if (this.getField("LtC7 WF EE").valueAsString!="") values.push("Musc Lt C7: " + this.getField("LtC7 WF EE").valueAsString);

if (this.getField("RtC7 WF EE").valueAsString!="") values.push("Musc Rt C7: " + this.getField("RtC7 WF EE").valueAsString);

if (this.getField("LtC8 TE F").valueAsString!="") values.push("Musc Lt C8: " + this.getField("LtC8 TE F").valueAsString);

if (this.getField("RtC8 TE F").valueAsString!="") values.push("Musc Rt C8: " + this.getField("RtC8 TE F").valueAsString);

if (this.getField("LtT1 HI").valueAsString!="") values.push("Musc Lt T1: " + this.getField("LtT1 HI").valueAsString);

if (this.getField("RtT1 HI").valueAsString!="") values.push("Musc Rt T1: " + this.getField("RtT1 HI").valueAsString);

if (this.getField("LtL1L2 IS HA").valueAsString!="") values.push("Musc Lt L1/L2: " + this.getField("LtL1L2 IS HA").valueAsString);if (this.getField("RtL1L2 IS HA").valueAsString!="") values.push("Musc Rt L1/L2: " + this.getField("RtL1L2 IS HA").valueAsString);

if (this.getField("LtL3 Q").valueAsString!="") values.push("Musc Lt L3: " + this.getField("LtL3 Q").valueAsString);

if (this.getField("RtL3 Q").valueAsString!="") values.push("Musc Rt L3: " + this.getField("RtL3 Q").valueAsString);

if (this.getField("LtL4 AT").valueAsString!="") values.push("Musc Lt L4: " + this.getField("LtL4 AT").valueAsString);

if (this.getField("RtL4 AT").valueAsString!="") values.push("Musc Rt L4: " + this.getField("RtL4 AT").valueAsString);

if (this.getField("LtL5 EH GMe").valueAsString!="") values.push("Musc Lt L5: " + this.getField("LtL5 EH GMe").valueAsString);

if (this.getField("RtL5 EH GMe").valueAsString!="") values.push("Musc Rt L5: " + this.getField("RtL5 EH GMe").valueAsString);

if (this.getField("LtS1S2 Gast").valueAsString!="") values.push("Musc Lt S1/S2: " + this.getField("LtS1S2 Gast").valueAsString);

if (this.getField("RtS1S2 Gast").valueAsString!="") values.push("Musc Rt S1/S2: " + this.getField("RtS1S2 Gast").valueAsString);

if (this.getField("LtC5 Bic").valueAsString!="") values.push("Reflex Lt C5: " + this.getField("LtC5 Bic").valueAsString);

if (this.getField("RtC5 Bic").valueAsString!="") values.push("Reflex Rt C5: " + this.getField("RtC5 Bic").valueAsString);

if (this.getField("LtC6 BR").valueAsString!="") values.push("Reflex Lt C6: " + this.getField("LtC6 BR").valueAsString);

if (this.getField("RtC6 BR").valueAsString!="") values.push("Reflex Rt C6: " + this.getField("RtC6 BR").valueAsString);

if (this.getField("LtC7 Tri").valueAsString!="") values.push("Reflex Lt C7: " + this.getField("LtC7 Tri").valueAsString);

if (this.getField("RtC7 Tri").valueAsString!="") values.push("Reflex Rt C7: " + this.getField("RtC7 Tri").valueAsString);

if (this.getField("LtL4 P").valueAsString!="") values.push("Reflex Lt L4: " + this.getField("LtL4 P").valueAsString);

if (this.getField("RtL4 P").valueAsString!="") values.push("Reflex Rt L4: " + this.getField("RtL4 P").valueAsString);

if (this.getField("LtL5MH").valueAsString!="") values.push("Reflex Lt L5: " + this.getField("LtL5MH").valueAsString);

if (this.getField("RtL5MH").valueAsString!="") values.push("Reflex Rt L5: " + this.getField("RtL5MH").valueAsString);

if (this.getField("LtS1 A").valueAsString!="") values.push("Reflex Lt S1: " + this.getField("LtS1 A").valueAsString);

if (this.getField("RtS1 A").valueAsString!="") values.push("Reflex Rt S1: " + this.getField("RtS1 A").valueAsString);

if (this.getField("LtC4").valueAsString!="") values.push("Sensory Lt C4: " + this.getField("LtC4").valueAsString);

if (this.getField("RtC4").valueAsString!="") values.push("Sensory Rt C4: " + this.getField("RtC4").valueAsString);

if (this.getField("LtC5").valueAsString!="") values.push("Sensory Lt C5: " + this.getField("LtC5").valueAsString);

if (this.getField("RtC5").valueAsString!="") values.push("Sensory Rt C5: " + this.getField("RtC5").valueAsString);

if (this.getField("LtC6").valueAsString!="") values.push("Sensory Lt C6: " + this.getField("LtC6").valueAsString);

if (this.getField("RtC6").valueAsString!="") values.push("Sensory Rt C6: " + this.getField("RtC6").valueAsString);

if (this.getField("LtC7").valueAsString!="") values.push("Sensory Lt C7: " + this.getField("LtC7").valueAsString);

if (this.getField("RtC7").valueAsString!="") values.push("Sensory Rt C7: " + this.getField("RtC7").valueAsString);

if (this.getField("LtC8").valueAsString!="") values.push("Sensory Lt C8: " + this.getField("LtC8").valueAsString);

if (this.getField("RtC8").valueAsString!="") values.push("Sensory Rt C8: " + this.getField("RtC8").valueAsString);

if (this.getField("LtT1").valueAsString!="") values.push("Sensory Lt T1: " + this.getField("LtT1").valueAsString);

if (this.getField("RtT1").valueAsString!="") values.push("Sensory Rt T1: " + this.getField("RtT1").valueAsString);

if (this.getField("RtT1").valueAsString!="") values.push("Sensory Rt T1: " + this.getField("RtT1").valueAsString);

if (this.getField("LtL4").valueAsString!="") values.push("Sensory Lt L4: " + this.getField("LtL4").valueAsString);

if (this.getField("RtL4").valueAsString!="") values.push("Sensory Rt L4: " + this.getField("RtL4").valueAsString);

if (this.getField("LtL5").valueAsString!="") values.push("Sensory Lt L5: " + this.getField("LtL5").valueAsString);

if (this.getField("RtL5").valueAsString!="") values.push("Sensory Rt L5: " + this.getField("RtL5").valueAsString);

if (this.getField("LtS1").valueAsString!="") values.push("Sensory Lt S1: " + this.getField("LtS1").valueAsString);

if (this.getField("RtS1").valueAsString!="") values.push("Sensory Rt S1: " + this.getField("RtS1").valueAsString);

if (this.getField("LtS2").valueAsString!="") values.push("Sensory Lt S2: " + this.getField("LtS2").valueAsString);

if (this.getField("RtS2").valueAsString!="") values.push("Sensory Rt S2: " + this.getField("RtS2").valueAsString);

if (this.getField("PathXRAY").valueAsString!="") values.push("Xray Path: " + this.getField("PathXRAY").valueAsString);

if (this.getField("ChiroXRAY").valueAsString!="") values.push("Chiro Xray Find: " + this.getField("ChiroXRAY").valueAsString);

if (this.getField("PathMRICT").valueAsString!="") values.push("MRI/CT Path: " + this.getField("PathMRICT").valueAsString);

if (this.getField("ChiroMRICT").valueAsString!="") values.push("Chiro MRI/CT Find: " + this.getField("ChiroMRICT").valueAsString);

event.value = values.join(", ");

TOPICS
Acrobat SDK and JavaScript, Windows

Views

136

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

HELP! Adding spacing to text populating to a single text box from multiple other check and text boxes.

Community Beginner ,
Feb 22, 2019

Copy link to clipboard

Copied

Hi,

I have a javascript already that is populating multiple check boxes and text boxes to a single summary text box and it is working great so far! The only issue I have is that when it all populates to the to the single summary text box it is one thing right after another separated only by commas.  It's hard to delineate where the related information starts and begins. Is there any way to put a like a "spacer line" to separate out the info to make it easier to read?  I have highlighted the related information that needs to be grouped together. I need a space to appear between each other these Colors when it populated to the summary text box. Any help is greatly appreciated...Thank you in advance.  Here is the Java script as it is now:

var values = []; 

for (var i=293; i<=306; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("A Shoulder Findings").valueAsString!="") values.push("A Shld Find: " + this.getField("A Shoulder Findings").valueAsString);

if (this.getField("Specific Shoulder Orthos").valueAsString!="") values.push("Specific Shld Othos: " + this.getField("Specific Shoulder Orthos").valueAsString);

 

for (var i=307; i<=316; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("A Elbow Findings").valueAsString!="") values.push("A Elbow Find: " + this.getField("A Elbow Findings").valueAsString);

if (this.getField("Specific Elbow Orthos").valueAsString!="") values.push("Specific Elbow Orthos: " + this.getField("Specific Elbow Orthos").valueAsString);

for (var i=317; i<=326; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("A Wrist Findings").valueAsString!="") values.push("A Wrist Find: " + this.getField("A Wrist Findings").valueAsString);

if (this.getField("Wrist Specific Orthos").valueAsString!="") values.push("Specific Wrist Orthos: " + this.getField("Wrist Specific Orthos").valueAsString);

for (var i=327; i<=340; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("P Shoulder Findings").valueAsString!="") values.push("P Shoulder Find: " + this.getField("P Shoulder Findings").valueAsString);

for (var i=341; i<=350; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("P Elbow Findings").valueAsString!="") values.push("P Elbow Find: " + this.getField("P Elbow Findings").valueAsString);

for (var i=351; i<=360; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("P Wrist Findings").valueAsString!="") values.push("P Wrist Find: " + this.getField("P Wrist Findings").valueAsString);

for (var i=361; i<=374; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("A Hip Findings").valueAsString!="") values.push("A Hip Find: " + this.getField("A Hip Findings").valueAsString);

if (this.getField("Specific Hip Orthos").valueAsString!="") values.push("Specific Hip Orthos: " + this.getField("Specific Hip Orthos").valueAsString);

for (var i=375; i<=384; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("A Knee Findings").valueAsString!="") values.push("A Knee Find: " + this.getField("A Knee Findings").valueAsString);

if (this.getField("Specific Knee Orthos").valueAsString!="") values.push("Specific Knee Orthos: " + this.getField("Specific Knee Orthos").valueAsString);

for (var i=385; i<=394; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("A Ankle Findings").valueAsString!="") values.push("A Ankle Find: " + this.getField("A Ankle Findings").valueAsString);

if (this.getField("Specific Ankle Orthos").valueAsString!="") values.push("Specific Ankle Orthos: " + this.getField("Specific Ankle Orthos").valueAsString);

for (var i=395; i<=408; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("P Hip Findings").valueAsString!="") values.push("P Hip Find: " + this.getField("P Hip Findings").valueAsString);

for (var i=409; i<=418; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("P Knee Findings").valueAsString!="") values.push("P Knee Find: " + this.getField("P Knee Findings").valueAsString);

for (var i=419; i<=428; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("P Ankle Findings").valueAsString!="") values.push("P Ankle Find: " + this.getField("P Ankle Findings").valueAsString);

for (var i=429; i<=431; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocMax CC").valueAsString!="") values.push("Max CC Findings: " + this.getField("LocMax CC").valueAsString);

for (var i=432; i<=434; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocCerv Comp").valueAsString!="") values.push("Cerv Comp Findings: " + this.getField("LocCerv Comp").valueAsString);

for (var i=435; i<=437; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocCerv Dist").valueAsString!="") values.push("Cerv Dist Findings: " + this.getField("LocCerv Dist").valueAsString);

for (var i=438; i<=440; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocJacksons").valueAsString!="") values.push("Jacksons Findings: " + this.getField("LocJacksons").valueAsString);

for (var i=441; i<=443; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocRt Rot Comp").valueAsString!="") values.push("Rt Rot Comp Findings: " + this.getField("LocRt Rot Comp").valueAsString);

for (var i=444; i<=446; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocLt Rot Comp").valueAsString!="") values.push("Lt Rot Comp Findings: " + this.getField("LocLt Rot Comp").valueAsString);

for (var i=447; i<=449; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocShld Depr").valueAsString!="") values.push("Shld Depr Findings: " + this.getField("LocShld Depr").valueAsString);

for (var i=450; i<=452; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocRev Bak").valueAsString!="") values.push("Rev Bak Findings: " + this.getField("LocRev Bak").valueAsString);

for (var i=453; i<=455; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocEdens").valueAsString!="") values.push("Edens Findings: " + this.getField("LocEdens").valueAsString);

for (var i=456; i<=458; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocValsalvas").valueAsString!="") values.push("Valsalvas Findings: " + this.getField("LocValsalvas").valueAsString);

for (var i=459; i<=461; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocSLRBrSiTu").valueAsString!="") values.push("SLRBrSiTu Findings: " + this.getField("LocSLRBrSiTu").valueAsString);

for (var i=462; i<=464; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocKemps").valueAsString!="") values.push("Kemps Findings: " + this.getField("LocKemps").valueAsString);

for (var i=465; i<=467; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocHeel Walk").valueAsString!="") values.push("Heel Walk Findings: " + this.getField("LocHeel Walk").valueAsString);

for (var i=468; i<=470; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocToe Walk").valueAsString!="") values.push("Toe Walk Findings: " + this.getField("LocToe Walk").valueAsString);

for (var i=471; i<=473; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocNachlasEly").valueAsString!="") values.push("Nachlas/Ely Findings: " + this.getField("LocNachlasEly").valueAsString);

for (var i=474; i<=476; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocGaenslins").valueAsString!="") values.push("Gaenslins Findings: " + this.getField("LocGaenslins").valueAsString);

for (var i=477; i<=479; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocMaziones").valueAsString!="") values.push("Maziones Findings: " + this.getField("LocMaziones").valueAsString);

for (var i=480; i<=482; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocCozR Coz").valueAsString!="") values.push("Coz/R Coz Findings: " + this.getField("LocCozR Coz").valueAsString);

for (var i=483; i<=485; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocPhalR Phal").valueAsString!="") values.push("Phal/R Phal Findings: " + this.getField("LocPhalR Phal").valueAsString);

for (var i=486; i<=488; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocScouring Hip").valueAsString!="") values.push("Hip Scouring Findings: " + this.getField("LocScouring Hip").valueAsString);

for (var i=489; i<=491; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocFabers").valueAsString!="") values.push("Fabers Findings: " + this.getField("LocFabers").valueAsString);

for (var i=492; i<=494; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocMcMurrys").valueAsString!="") values.push("McMurrys Findings: " + this.getField("LocMcMurrys").valueAsString);

for (var i=495; i<=497; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocMITLIT").valueAsString!="") values.push("MIT/LIT Findings: " + this.getField("LocMITLIT").valueAsString);

for (var i=498; i<=500; i++) { 

    var fname = "CheckBox "+i; 

    var f = this.getField(fname); 

    if (f==null) { 

        console.println("Error! Can't find: " + fname); 

        continue; 

    } 

    if (f.valueAsString!="Off") values.push(f.valueAsString); 

}

if (this.getField("LocTinnels").valueAsString!="") values.push("Tinnels Findings: " + this.getField("LocTinnels").valueAsString);

if (this.getField("LtC4 UT").valueAsString!="") values.push("Musc Lt C4: " + this.getField("LtC4 UT").valueAsString);

if (this.getField("RtC4 UT").valueAsString!="") values.push("Musc Rt C4: " + this.getField("RtC4 UT").valueAsString);

if (this.getField("LtC5 D Bic").valueAsString!="") values.push("Musc Lt C5: " + this.getField("LtC5 D Bic").valueAsString);

if (this.getField("RtC5 D Bic").valueAsString!="") values.push("Musc Rt C5: " + this.getField("RtC5 D Bic").valueAsString);

if (this.getField("LtC6 BR WE").valueAsString!="") values.push("Musc Lt C6: " + this.getField("LtC6 BR WE").valueAsString);

if (this.getField("RtC6 BR WE").valueAsString!="") values.push("Musc Rt C6: " + this.getField("RtC6 BR WE").valueAsString);

if (this.getField("LtC7 WF EE").valueAsString!="") values.push("Musc Lt C7: " + this.getField("LtC7 WF EE").valueAsString);

if (this.getField("RtC7 WF EE").valueAsString!="") values.push("Musc Rt C7: " + this.getField("RtC7 WF EE").valueAsString);

if (this.getField("LtC8 TE F").valueAsString!="") values.push("Musc Lt C8: " + this.getField("LtC8 TE F").valueAsString);

if (this.getField("RtC8 TE F").valueAsString!="") values.push("Musc Rt C8: " + this.getField("RtC8 TE F").valueAsString);

if (this.getField("LtT1 HI").valueAsString!="") values.push("Musc Lt T1: " + this.getField("LtT1 HI").valueAsString);

if (this.getField("RtT1 HI").valueAsString!="") values.push("Musc Rt T1: " + this.getField("RtT1 HI").valueAsString);

if (this.getField("LtL1L2 IS HA").valueAsString!="") values.push("Musc Lt L1/L2: " + this.getField("LtL1L2 IS HA").valueAsString);if (this.getField("RtL1L2 IS HA").valueAsString!="") values.push("Musc Rt L1/L2: " + this.getField("RtL1L2 IS HA").valueAsString);

if (this.getField("LtL3 Q").valueAsString!="") values.push("Musc Lt L3: " + this.getField("LtL3 Q").valueAsString);

if (this.getField("RtL3 Q").valueAsString!="") values.push("Musc Rt L3: " + this.getField("RtL3 Q").valueAsString);

if (this.getField("LtL4 AT").valueAsString!="") values.push("Musc Lt L4: " + this.getField("LtL4 AT").valueAsString);

if (this.getField("RtL4 AT").valueAsString!="") values.push("Musc Rt L4: " + this.getField("RtL4 AT").valueAsString);

if (this.getField("LtL5 EH GMe").valueAsString!="") values.push("Musc Lt L5: " + this.getField("LtL5 EH GMe").valueAsString);

if (this.getField("RtL5 EH GMe").valueAsString!="") values.push("Musc Rt L5: " + this.getField("RtL5 EH GMe").valueAsString);

if (this.getField("LtS1S2 Gast").valueAsString!="") values.push("Musc Lt S1/S2: " + this.getField("LtS1S2 Gast").valueAsString);

if (this.getField("RtS1S2 Gast").valueAsString!="") values.push("Musc Rt S1/S2: " + this.getField("RtS1S2 Gast").valueAsString);

if (this.getField("LtC5 Bic").valueAsString!="") values.push("Reflex Lt C5: " + this.getField("LtC5 Bic").valueAsString);

if (this.getField("RtC5 Bic").valueAsString!="") values.push("Reflex Rt C5: " + this.getField("RtC5 Bic").valueAsString);

if (this.getField("LtC6 BR").valueAsString!="") values.push("Reflex Lt C6: " + this.getField("LtC6 BR").valueAsString);

if (this.getField("RtC6 BR").valueAsString!="") values.push("Reflex Rt C6: " + this.getField("RtC6 BR").valueAsString);

if (this.getField("LtC7 Tri").valueAsString!="") values.push("Reflex Lt C7: " + this.getField("LtC7 Tri").valueAsString);

if (this.getField("RtC7 Tri").valueAsString!="") values.push("Reflex Rt C7: " + this.getField("RtC7 Tri").valueAsString);

if (this.getField("LtL4 P").valueAsString!="") values.push("Reflex Lt L4: " + this.getField("LtL4 P").valueAsString);

if (this.getField("RtL4 P").valueAsString!="") values.push("Reflex Rt L4: " + this.getField("RtL4 P").valueAsString);

if (this.getField("LtL5MH").valueAsString!="") values.push("Reflex Lt L5: " + this.getField("LtL5MH").valueAsString);

if (this.getField("RtL5MH").valueAsString!="") values.push("Reflex Rt L5: " + this.getField("RtL5MH").valueAsString);

if (this.getField("LtS1 A").valueAsString!="") values.push("Reflex Lt S1: " + this.getField("LtS1 A").valueAsString);

if (this.getField("RtS1 A").valueAsString!="") values.push("Reflex Rt S1: " + this.getField("RtS1 A").valueAsString);

if (this.getField("LtC4").valueAsString!="") values.push("Sensory Lt C4: " + this.getField("LtC4").valueAsString);

if (this.getField("RtC4").valueAsString!="") values.push("Sensory Rt C4: " + this.getField("RtC4").valueAsString);

if (this.getField("LtC5").valueAsString!="") values.push("Sensory Lt C5: " + this.getField("LtC5").valueAsString);

if (this.getField("RtC5").valueAsString!="") values.push("Sensory Rt C5: " + this.getField("RtC5").valueAsString);

if (this.getField("LtC6").valueAsString!="") values.push("Sensory Lt C6: " + this.getField("LtC6").valueAsString);

if (this.getField("RtC6").valueAsString!="") values.push("Sensory Rt C6: " + this.getField("RtC6").valueAsString);

if (this.getField("LtC7").valueAsString!="") values.push("Sensory Lt C7: " + this.getField("LtC7").valueAsString);

if (this.getField("RtC7").valueAsString!="") values.push("Sensory Rt C7: " + this.getField("RtC7").valueAsString);

if (this.getField("LtC8").valueAsString!="") values.push("Sensory Lt C8: " + this.getField("LtC8").valueAsString);

if (this.getField("RtC8").valueAsString!="") values.push("Sensory Rt C8: " + this.getField("RtC8").valueAsString);

if (this.getField("LtT1").valueAsString!="") values.push("Sensory Lt T1: " + this.getField("LtT1").valueAsString);

if (this.getField("RtT1").valueAsString!="") values.push("Sensory Rt T1: " + this.getField("RtT1").valueAsString);

if (this.getField("RtT1").valueAsString!="") values.push("Sensory Rt T1: " + this.getField("RtT1").valueAsString);

if (this.getField("LtL4").valueAsString!="") values.push("Sensory Lt L4: " + this.getField("LtL4").valueAsString);

if (this.getField("RtL4").valueAsString!="") values.push("Sensory Rt L4: " + this.getField("RtL4").valueAsString);

if (this.getField("LtL5").valueAsString!="") values.push("Sensory Lt L5: " + this.getField("LtL5").valueAsString);

if (this.getField("RtL5").valueAsString!="") values.push("Sensory Rt L5: " + this.getField("RtL5").valueAsString);

if (this.getField("LtS1").valueAsString!="") values.push("Sensory Lt S1: " + this.getField("LtS1").valueAsString);

if (this.getField("RtS1").valueAsString!="") values.push("Sensory Rt S1: " + this.getField("RtS1").valueAsString);

if (this.getField("LtS2").valueAsString!="") values.push("Sensory Lt S2: " + this.getField("LtS2").valueAsString);

if (this.getField("RtS2").valueAsString!="") values.push("Sensory Rt S2: " + this.getField("RtS2").valueAsString);

if (this.getField("PathXRAY").valueAsString!="") values.push("Xray Path: " + this.getField("PathXRAY").valueAsString);

if (this.getField("ChiroXRAY").valueAsString!="") values.push("Chiro Xray Find: " + this.getField("ChiroXRAY").valueAsString);

if (this.getField("PathMRICT").valueAsString!="") values.push("MRI/CT Path: " + this.getField("PathMRICT").valueAsString);

if (this.getField("ChiroMRICT").valueAsString!="") values.push("Chiro MRI/CT Find: " + this.getField("ChiroMRICT").valueAsString);

event.value = values.join(", ");

TOPICS
Acrobat SDK and JavaScript, Windows

Views

137

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 22, 2019 0
Adobe Community Professional ,
Feb 22, 2019

Copy link to clipboard

Copied

It currently separates each array item with a comma and space. It's unclear what you want in addition to that. Can you clarify?

You could set up another array and push the strings for each colored section into it, and join them with whatever string you want, like you're doing now with the other array items.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 22, 2019 0
Community Beginner ,
Feb 22, 2019

Copy link to clipboard

Copied

ok when it populates to the summary text box.... for example it looks like this and it it hard to tell then there are groups of related information because it's all one right after another.

Apples, strawberries, bananas, broccoli, carrots, asparagus, water, tea, juice, cat, dog, horse

I would like to be like this in the summary box:

Apples, strawberries, bananas,

broccoli, carrots, asparagus,

water, tea, juice,

cat, dog, horse

Each group of related information is separated out by an "enter space" so they you better see where related information starts and stops. 

I would like a "enter space" separating the related information of each highlight color in the Javascript above. (I just used the color as a visual aid as to where the related information starts and stops in the javascript.)  Does this help? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 22, 2019 1
try67 LATEST
Most Valuable Participant ,
Feb 22, 2019

Copy link to clipboard

Copied

At the end of each section add something like this:

if (values.length>0) values.push("\n\n");

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 22, 2019 0