I want to create a rule that signature field is not active until the date is filled in
I have 2 text fields. One where you should fill in the current date, and one signature field.
I want it to be impossible to sign the form without filling in the date. Below is the code i have tried, that does not work. This code is applied to "Date field - Actions - Run a JavaScript"
var dateField = this.getField("Signature Completion Date"); // Replace with the actual name of your date field
var signatureField = this.getField("DMY"); // Replace with the actual name of your signature field
if (dateField.value === "") {
app.alert("Please fill in the date field before signing.", 3);
} else {
// Allow the signature field to be signed
signatureField.signatureSign();
}