DynaPDF Manual - Page 72
Previous Page 71 Index Next Page 73
![](dynapdf_help_files/background-072.jpg)
Interactive Forms
Page 72 of 860
field type of this group field is set to ftGroup as usual but the group type is set to a field type
other than ftGroup (see GetFieldGroupType()).
The unambiguous test whether a group field is an ordinary group field or a terminal field of a
Field Group is to compare the group type with the field type. If the group type is something else
than ftGroup then this is a terminal field of a Field Group.
In this case the field contains the field name of the children as well as the field value, default
value, and tooltip. The field flags, background, border and text color, border width, and the
border style are inherited from the terminal field but can be overridden by the children.
Please note that Adobe’s Designer creates mostly Field Groups also if only one child is part of
the group.
When changing a value or property of a Field Group there is nothing special that must be
considered. DynaPDF sets the wished value or property automatically to the right field.
How to create a Field Group?
Field groups can be created in two ways: When creating two fields with the same name and
type then DynaPDF creates automatically a field group. However, it is also possible to set the
handle of the parent field to indicate that the field should be added to this field as a child. The
latter variant is a little bit faster.
Example:
SI32 prt = pdfCreateTextField(pdf, "Test", -1,false,-1,50, 50,150,20);
pdfCreateTextField(pdf, "Test",prt,false,-1,50, 80,150,20);
pdfCreateTextField(pdf, "Test",prt,false,-1,50,110,150,20);
or
// Same result but requires more processing time
pdfCreateTextField(pdf, "Test", -1, false, -1, 50,
50, 150, 20);
pdfCreateTextField(pdf, "Test", -1, false, -1, 50,
80, 150, 20);
pdfCreateTextField(pdf, "Test", -1, false, -1, 50, 110, 150, 20);
See also section "Fields with identical names".
How to change the tabulator order?
The form fields and annotations of a page are stored in an array. The order of fields in this array
represents the tab order. New fields are added to the array in the order in which they were
created. To enable the definition of an arbitrary tab order, each form field and annotation holds
a page index variable which can be used to sort the fields.
Previous topic: What is a Group Type?
Next topic: Field Names, Fields with identical names