Field Validation Max value in Adobe Forms.
I was trying to mess around with maximum values within the fields of my Adobe Form document.
I learned how to do this through the validation tab in the text field properties, but I was trying to set it so that the maximum value for that field would be based on the value of another field and the checking of a check box.
So for instance...
Field1 is titled Lvl
Field2 is titled Str
Checkbox is titled KeyAttribute1
Str would have a maximum value of Lvl+2, and if a value higher than that would be entered text would appear that would say "Strength cannot be higher than your level + 2". Alternatively, if KeyAttribute1 were selected it would change the maximum value and the text would change to be Lvl+5, rather than Lvl+2.
I have read things that show me this is possible, but I cant seem to figure out how to make it work. My best guess is something along these lines...
var direction;
if(get.thisField("Str").value>get.thisField("Lvl").value + 2)
else ("Strength cannot be higher than your level + 2")
if(KeyAttribute1 == “Off” )
{
var direction;
if(get.thisField("Str").value>get.thisField("Lvl").value + 5)
else ("Strength cannot be higher than your level + 5")
}
But it won't even let me enter this because it says everything between the brackets is a syntax error. There are some other max field formulas I wanted to do, but they don't involve checkboxes, so I feel that if I figure out how to do this, the others will be easier.
