I am trying to create an email with information from certain fields. One problem I have is that an ampersand is getting "interpreted" instead of passed.
Here is part of my code:
var r = this.getField("Rx");
var cRx = (r.isBoxChecked(0)) ? "Rx" : "";
var l = this.getField("LOMN");
var cLOMN = (l.isBoxChecked(0)) ? "LOMN" : "";
var h = this.getField("H&P");
var cHP = (h.isBoxChecked(0)) ? "H\&P" : "";
var x = this.getField("X-rays");
var cXrays = (x.isBoxChecked(0)) ? "X-rays" : "";
cDocs = cRx + " " + cLOMN + " " + cHP + " " + cXrays;
This successfully updates cDocs with only the checkboxes that are checked but in the resulting email, if the H&P box is checked, all I get are the field values up to just the letter 'H' and the rest of the values are ignored. If I change "H\&P" to something like "HandP" it works fine and I get all the following field values.
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com