Can anyone tell me why this code doesnt populate the PHONE textfield...but does populate all the rest of the fields
if (xfa.event.newText == "xxxxxxxx") then
City = "Mississauga"
Prov = "ON"
PC = "L5L 5Z9"
Phone = "xxxxxx7328"
Cell = "xxxxxx3379"
Fax = "xxxxxx8218"
email = "xxxx [at] xxxx [dot] com"
elseif (xfa.event.newText == "xxxxxxxx") then
City = "Delaware"
Prov = "ON"
PC = "N0L 1E0"
Phone = "xxxxxx7359"
Cell = "xxxxxx1770"
Fax = "xxxxxx2707"
email = "xxxx [at] xxxxx [dot] com"
elseif (xfa.event.newText == "xxxxxxxx") then
City = "Thamesford"
Prov = "ON"
PC = "N0M 2M0"
Phone = "xxxxxx7359"
Cell = "xxxxxx1770"
Fax = "xxxxxx8261"
email = "xxxx [at] cxxxxx [dot] com"
But the phone field problem isn't visible in this code. More than likely it's a field naming issue. The field names must match the names used in FormCalc exactly, including any subform hierarchy.
However, there may be some other problem with the form as well. There's no way to tell without examining the PDF.
Check your form over to make sure the names and hierarchy match.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script