Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
5

I want to create a rule that signature field is not active until the date is filled in

New Here ,
Oct 16, 2023 Oct 16, 2023

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();
}

TOPICS
JavaScript , PDF forms
308
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 16, 2023 Oct 16, 2023

You can use this as validation script of date field, it will set signature field to read only until date field is filled:

this.getField("DMY").readonly = event.value == "" ? true : false;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 16, 2023 Oct 16, 2023
LATEST

A digital signature necessarily contains the date and time of signature.


Acrobate du PDF, InDesigner et Photoshoptographe
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines