Any number that I put in the fields. I also need to be able to edit it afterwards. So for example I could put the number 10 in field 1 and 20 in field 2 and I would get an error in field two which then I could change to another number and have the word error go away if it is lower than field 1. Hope that make sense.
It's not a good idea to mix a user-entered value with a calculated value. I
suggest you use a third field for the error text.
Ok, That makes sense. Do you know how to make that?
The code for the field? Sure, it's simple.
You can use something like this as its custom calculation code:
var v1 = this.getField("Field 1").valueAsString;
var v2 = this.getField("Field 2").valueAsString;
if (v1 && v2 && Number(v2)<Number(v1)) event.value = "Error";
else event.value = "";
Edit: Fixed code
Thanks. That worked wonderfully.