Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

Help with JavaScript Acrobat form

$
0
0

Hi all,

 

I'm wondering if anyone can help me.

 

I need to create an acrobat form which populates a field depending on the result of 2 other fields, the first field is a unit value and the second field is a drop down menu with yes/no options.

 

If field (total) is over '20' units and/or field (patient4) has the drop down of 'yes' then the text 'Consider iron chelation therapy†' appears in field (consider), otherwise field (consider) remains blank.

 

This is what I have but it doesn't work (by the way I'm pretty much a complete JavaScript novice)

 

 

 

 

(function () {

 

if (this.getField("total").value >= '20') {

event.value = Consider iron chelation therapy†

} else if (this.getField("patient4").value = 'yes') {

event.value = Consider iron chelation therapy†

}  else {

event.value = 0 // Default value here

}

 

})();

 

 

Any help would be greatly appreciated.

Cheers

Graeme


Viewing all articles
Browse latest Browse all 12130

Trending Articles