DynaPDF Manual - Page 71
Previous Page 70 Index Next Page 72

Interactive Forms
Page 71 of 860
• GetPageFieldCount()
// Number of fields of a page
• GetFieldExpValCount()
// Number of values/export values
• Get/SetFieldExpValue()
// Export value of a field
• GetFieldExpValueEx()
// Value and export value pair
• GetFieldGroupType()
// Base type of a field group
• GetFieldType()
// Field type
• SetAnnotOrFieldDate()
// Sets the modification date
• SetCheckBoxState()
// Changes the state of a check box
• SetCheckBoxDefState()
// Changes the default state of a check box
• Get/SetFieldHighlightMode() // Field highlight mode
• Get/SetFieldIndex()
// Index to change the tab order
• Get/SetFieldFlags()
// Field flags
• Get/SetFieldMapName()
// Mapping name -> export name
• Get/SetFieldName()
// Field name
• Get/SetFieldOrientation()
// Field orientation
• Get/SetFieldTextAlign()
// Text alignment of a text field
• Get/SetFieldToolTip()
// Tool tip or field description
• Get/SetTextFieldValue()
// Text field value or default value
GetFieldEx() is the most important function to retrieve field properties. Fields can be accessed
via the global handle or via the index within the field array of the current page.
What is a Group Type?
The field type ftGroup is used for different purposes depending on how fields are organized. A
normal group field is used to create a logical hierarchy or group of fields but group fields are
also used to create a so called “Field Group”.
A normal group field is a set of fields which use a parent field of type ftGroup to achieve a
logical hierarchy, e.g. Address.Street, Address.Country, and so on. The field and group type of
the parent group field are both set to ftGroup in this case.
One important thing must be considered when accessing children of a group field: The group
field does not occur in the field array of a page; it is only available in the global AcroForm field
array. So, while GetFieldEx() returns the entire field array including group fields
GetPageFieldEx() returns never group fields! The parent group field can be accessed with the
Parent handle of the children in this case.
The second usage of a group field is to achieve a so called “Field Group”. A Field Group is an
array of fields of the same type which share the same name and value. Such fields are internally
organized into a special kind of group field which holds the field name and value, as well as
other properties which can be shared among the group.
The children of a Field Group have no name. So, if a field contains no name then you can
already assume that it is part of a Field Group because the field name is required to be present
otherwise. Children of a Field Group contain always the handle to the parent group field. The
Previous topic: Important field properties when creating new fields, Field Properties
Next topic: How to create a Field Group?, How to change the tabulator order?