Repeated Sections and Code Table Descriptions

Some forms contain repeated sections, for example "List the details of all the people in your household" or "List all your sources of Income from Work". The PDF Application Builder is designed to deal with this provided the PDF Author names the fields according to the correct conventions. For example, fields used to collect data about household members might be named as follows:

Table 1. Fields in a PDF Form for Recording Household Members
Name How Is Person Related to You? Date of Birth Social Security Number
OtherPerson0.Name OtherPerson0
.RelType
OtherPerson0
.DateOfBirth
OtherPerson0
.SSN
OtherPerson1.Name OtherPerson1
.RelType
ÒtherPerson1
.DateOfBirth
OtherPerson1
.SSN
OtherPerson2.Name OtherPerson2
.RelType
OtherPerson2
.DateOfBirth
OtherPerson2
.SSN

The corresponding Mapping Configuration would be written as follows:

1  <section name="Person" type="multiple">
2   <field name="Name" type="append" append-separator=" "/>          
3   <field name="RelType" codetable-class="RelationshipTypeCode"/>          
4   <field name="DateofBirth"/>
5  </section>

Note, line 1 the attribute type="multiple" is what causes the section to be repeated. Note the codetable-class attribute on line 3 in this sample. This is a very useful attribute that causes codetable values to be translated into localized descriptions. By using it in the above context the script author ensures that the second column is populated with localized values like "Parent" and "Sibling" instead of meaningless codes like "RT1" or "RT3".