submit button to change appearance based on fields
In my form I have a signature field and a date field with a submit button below it. My goal is when either both or one of these fields are empty the submit button is grey and read only. It becomes enabled only after both fields are entered. My script works beautifully with the signature field, but the date field doesn't seem to effect the button regardless.
Here is my script:
if ((this.getField("Employee_Signature").value.length === 0)&&(this.getField("Date").value.length === 0)){
this.getField("Submit").fillColor = ["RGB", 192/255, 192/255, 192/255];
this.getField("Submit").readonly = true;
} else {
this.getField("Submit").fillColor = ["RGB", 0/255, 170/255, 0/255];
this.getField("Submit").readonly = false;
}
I have this script running in both the signature field and the date field. Here is the location of the signature field script:

and here is where I have it for the date field:

My script doesn't appear to have any errors, I've tested it, but is it missing something? Or am I putting the script in the wrong place?
