THotPDF.GetLoadedFormFieldOptionCount Method
When the selected form field in the loaded document belongs to a selectable control such as a combo box or list box, returns the specific number of options contained within that control.
Declaration
function GetLoadedFormFieldOptionCount(FieldIndex: Integer): Integer;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
FieldIndex | The index of the target form control in the document's field array (zero-based). |
Return value
Returns the total number of sub-items or selectable options carried by the field. If it is not a selectable control type, it may return 0.
Usage notes
- This API gives you the exact number of options in a combo or list box, ready for further traversal, export or filling
- Be sure to verify that the control type is a combo box before execution.
- Loaded-document object references may be indirect; resolve arrays, dictionaries or streams before inspecting nested values