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

How do I create an Acrobat Pro form with optional signatures?

New Here ,
Sep 02, 2020 Sep 02, 2020

Copy link to clipboard

Copied

I'm creating a form in Acrobat Pro from an existing PDF using the Prepare Form feature. I need a signature in one of two places. One place is to sign if the signer is 18+. There is a separate place for the signature if signing for a minor. I can only see how to require a signature in both places. How do I request the signature for either or?

TOPICS
How to

Views

456

Translate

Translate

Report

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 ,
Sep 02, 2020 Sep 02, 2020

Copy link to clipboard

Copied

Do you have an age field, or DOB, or something like that?

Votes

Translate

Translate

Report

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
New Here ,
Sep 10, 2020 Sep 10, 2020

Copy link to clipboard

Copied

Yes there is.

Votes

Translate

Translate

Report

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 ,
Sep 10, 2020 Sep 10, 2020

Copy link to clipboard

Copied

OK... Which one?

Votes

Translate

Translate

Report

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
New Here ,
Sep 10, 2020 Sep 10, 2020

Copy link to clipboard

Copied

DOB text field

Votes

Translate

Translate

Report

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 ,
Sep 10, 2020 Sep 10, 2020

Copy link to clipboard

Copied

You can use this code as that field's custom Validation script, then (adjust the date format pattern and the names of the signature fields, as needed):

 

if (event.value) {
	var age = calcAge(event.value, "mm/dd/yyyy");
	this.getField("SignatureMinor").required = (age<18);
	this.getField("SignatureAdult").required = (age>=18);
} else {
	this.getField("SignatureMinor").required = false;
	this.getField("SignatureAdult").required = false;
}

function calcAge(dobValue, dateFormat) {
	var dob = util.scand(dateFormat, dobValue);
	var now = new Date();
	var age = now.getFullYear() - dob.getFullYear();
	if (now.getMonth() < dob.getMonth()) {
		age--;
	} else if (now.getMonth()==dob.getMonth() && now.getDate() < dob.getDate()) {
		age--;
	}
	return age;
}

Votes

Translate

Translate

Report

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
New Here ,
Sep 10, 2020 Sep 10, 2020

Copy link to clipboard

Copied

LATEST

You are amazing. Thanks for your help! I knew there had to be a way.

Votes

Translate

Translate

Report

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