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, PDF forms

Views

45

Likes

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

Copy link to clipboard

Copied

LATEST

Hi,

Try with :

...

if (fieldA == "Yes") {

...

@+

Likes

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