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

If/then statement when clicking submit button

New Here ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

Hello,

 

I'm at a loss here and I was wondering if anyone can help. Thank you so much in advance.

I'm looking to check if fieldA which is a dropdown yes or no field. If fieldA is Yes, then do nothing. If fieldA is No, then get the date and time and convert it to a hexidecimal value. What is wrong with my script?

 

var fieldA = this.getField("Resubmission").value;
var hexString = this.getField("LRFNO").value;
if (fieldA = "Yes") {
hexString = "";
}
else {var ts = Math.round((new Date()).getTime() / 1000);
hexString = ts.toString(16).toUpperCase();
}

TOPICS
Acrobat SDK and JavaScript

Views

178

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 ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

LATEST

Hi,

Try with :

...

if (fieldA == "Yes") {

...

@+

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