I have a PDF form with several sections on it. Each section captures information about a person for example Person1 might be a teacher, Person2 might be a student, Person3 might be a parent.
For each of these people the forms captures some information which is common to all of them like Name, Address, Phone, then depending on whether it is a student parent or teacher the are 3-4 other fields which depend on the type of person ie:
PDF FIELD NAMES
Teacher ID number
Now a lot of the information for each person can be obtained from another application on the same system so I can copy, for example this information to the clipboard:
CLIPBOARD INFORMATION TO PARSE
Person Id: 1234567
(Name): BUGSY Malone
(Home Address) 123 Any Street
(Occupation) Truck Driver
I have written the parser function with regexp to grab this information as store each piece as a string and for the teacher section I have hardcoded
What I now need is a way to call my parser function from any of the parent, student, or teacher fields, and have the code put the right information in the right place,even though sometimes the field names are slightly different, and sometimes there is not a field for a piece of information from the parser - like "Race"
Thanks in advance,