THotPDF.GetLoadedFormFieldOption Method
Reads the export value of the specified option in the loaded PDF form field, whilst returning the corresponding display text via an output parameter
Declaration
function GetLoadedFormFieldOption(FieldIndex, OptionIndex: Integer; out ADisplayValue: AnsiString): AnsiString;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
FieldIndex | The zero-based index of the target form field |
OptionIndex | The zero-based option index within the field's options list |
ADisplayValue | Output parameter, receives the text displayed to the user for this option on the interface |
Return value
Returns the export value of this option, which is the actual string passed to the server or FDF when the form is submitted
Usage notes
- 仅适用于包含选项列表的字段类型(如下拉框 ComboBox 或列表框 ListBox),对普通文本字段调用将返回空字符串
- OptionIndex 必须在 0 到
GetLoadedFormFieldOptionCount - 1范围内,越界将触发异常 - Export values and display text can differ; please distinguish between their uses before submission to avoid mistaking display text for submitted content