Expand my Community achievements bar.

Who Me Too'd this topic

Avatar

Level 3

I am having trouble with a code I wrote for a form. It is working, however, it throws an error message and I don't understand why.

My field's default background fill color is set to white. Here is my code:

//Create a variable

var backgroundfilling;

//Subtract items to get the value of the field

this.rawValue = Num.rawValue - (Sub.rawValue);

if (this.rawValue < 0) {

    backgroundfilling = "231,179,173"; //Set the color to red if value is less than zero

}

else {

    backgroundfilling = "255,255,255"; //Set the color back to white if value is zero or greater

}

answer.fillColor = backgroundfilling; //Set the background color

Everytime I open or preview the form now, it gives an error that says: "Illegal value: cannot assign '255,255,255' to xfa[0].form[0].Page1[0].GeneralInput[0].answer[0].#value[0].#float[0]."

What??? Why is it throwing this error?

Who Me Too'd this topic