Question
Add color to JavaScript string variables.
Hello,
I am attempting to add color to my variables that are inserted into standard text.
All varaiables can be colored "red" or rgb 255,0,0 or hex FF0000.
Here is my current code,
var frequency = this.getField("Dropdown8").valueAsString;
var date = this.getField("Date7_af_date").valueAsString;
var target = this.getField("Text9").valueAsString;
var calcmonths = this.getField("Text99").valueAsString;
var periodend = this.getField("Dropdown88").valueAsString;
var dropdown3Value = this.getField("Dropdown3").valueAsString;
if (dropdown3Value === "Consolidate Debt Service Coverage Ratio C&I, CRE, AgCash, Non-Profit") {
event.value = "This is test paragraph 1 " + target + " and " + frequency + " and " + calcmonths + " and " + date + " and " + calcmonths + " end paragraph.";}
else if (dropdown3Value === "Consolidate Debt Service Coverage Ratio, Less Distributions C&I, CRE, AgCash") {
event.value = "This is a test of paragraph 2 " + frequency + " and " + date + " and " + target + ".";}
else if (dropdown3Value === "Consolidate Minimum Current Ratio C&I, CRE") {
event.value = "This a test paragraph 3 " + target + " and " + periodend + " and " + date + ".";}
else if (dropdown3Value === "Consolidate Maximum Debt/TNW C&I, CRE") {
event.value = "This is a test paragraph 4 " + target + " and " + periodend + " and " + calcmonths + " end.";}
else
event.value = "";
Thank you!
