I am generating a form against a table of 50 location names in a database. I don't have access to the database but thought I could add the location address and phone number to the form based on the location pulled from the application.
Thought a simple script could do the trick:
if (xfa.event.newText==" ")
{form1.bodyPage1.address1.rawValue=""
form1.bodyPage1.address2.rawValue=""
form1.bodyPage1.phone.rawValue=""}
The first line is the location pulled from the table.
I would add the address and phone with the script.
The form does correctly pull the location name but no address or phone.
Is this doable?
In the code above all the values are empty strings. What do you mean by "pulled from the application?" Do you mean hard coded values? Is there a Data Connection defined for the form. Is it bound to the fields in question? Are any errors reported in the console window?
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script