DynaPDF Manual - Page 273

Previous Page 272   Index   Next Page 274

Function Reference
Page 273 of 839
CreateGroupField
Syntax:
SI32 pdfCreateGroupField(
const PPDF* IPDF, // Instance pointer
const char* Name, // Name of the field
SI32 Parent)
// Parent group field if any or -1
This function creates a group field. A group field is a simple array of fields which can be used to
separate fields into several groups. The field itself has no appearance, it is invisible.
For example, if an interactive form contains fields for private personal data and fields for company
data in any kind, the fields can be structured into two base parts: PersonalData and CompanyData.
The field names of each part must be unique inside its own hierarchy. However, duplicate field
names of fields of the same type are still allowed.
Field names and Group fields
The name of a specific interactive form field is the partial field name. The fully qualified name is not
explicitly defined, but is constructed from the partial field name of the field and all of its ancestors.
For a field with no parent, the partial field name and the fully qualified name are the same; for a
field that is the child of a parent (group) field, the fully qualified name is formed by appending the
child field's partial name to the parent's fully qualified name, separated by a period (.):
parent_field_name.child_partial_name
For example, if a group field with the partial field name PersonalData has a child whose partial field
name is Address, which in turn has a child with the partial field name ZipCode, then the fully
qualified name of this last field would be
PersonalData.Address.ZipCode
Thus all fields descended from a common ancestor will share the ancestor's fully qualified field
name as a common prefix in their own fully qualified names.
The naming scheme must be taken into account when accessing fields of a group in JavaScript
functions.
Remarks:
Acrobat 4 does not support group fields inside a hide or form action. For example, if a group field
will be added to a hide action, the entire group becomes invisible if the action is executed in Acrobat
5 or higher. Acrobat 4 ignores the group field; each field of the group must be manually added to
the hide action.
Return values:
If the function succeeds the return value is the field handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
 

Previous topic: CreateGoToRActionEx

Next topic: CreateHideAction, CreateICCBasedColorSpace