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

conditional readonly signature field

Community Beginner ,
Jul 25, 2019 Jul 25, 2019

in my digital forms using pdf expert on ipad

i have ( submit by email ) button with mailDoc, mouse up run JavaScript action

i added another mouse up action

if(this.getField("CAP1Signature").value !=""){

this.getField("CAP1Signature").readonly = true;

}

////

if(this.getField("CAP1Signature").value =""){

this.getField("CAP1Signature").readonly = false;

}

to make the a signature field is readonly if the field is already signed

and (not) if the field is still blank

to ensure that the file will send with readonly signature

and also make a chance for the user if he forgot to sign before click on the button

my script is working half or the other half

i tried also

if(this.getField("CAP1Signature").value !=""){

this.getField("CAP1Signature").readonly = true;

}else{this.getField("CAP1Signature").readonly = false;}

i got the same result

any help please !?

thank you in advance

TOPICS
Acrobat SDK and JavaScript , Windows
1.3K
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

correct answers 1 Correct answer

Community Expert , Jul 26, 2019 Jul 26, 2019

In the former code you've made a classic error of using the wrong operator in your if-condition. You've used "=", which assigns a value, instead of "==", which compares two values.

The second code is better, but the question is, where did you place it?

Translate
Community Expert ,
Jul 26, 2019 Jul 26, 2019

In the former code you've made a classic error of using the wrong operator in your if-condition. You've used "=", which assigns a value, instead of "==", which compares two values.

The second code is better, but the question is, where did you place it?

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 Beginner ,
Jul 27, 2019 Jul 27, 2019

mouse up run a JavaScript action

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 Beginner ,
Jul 27, 2019 Jul 27, 2019

in the button

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 Beginner ,
Jul 27, 2019 Jul 27, 2019

if(this.getField("CAP1Signature").value !=""){

this.getField("CAP1Signature").readonly == true;

}else{this.getField("CAP1Signature").readonly == false;}

I correct the script but i got the same result

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 ,
Jul 27, 2019 Jul 27, 2019
LATEST

Change both instances of "==" to "=" (no quotes).

On Sat, Jul 27, 2019, 13:24 almasriaa54428630 <forums_noreply@adobe.com>

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