GetFormFieldAllowedValues

Form fields

Description

Returns the allowed values of a choice field, the /Opt array of a list box or combo box, as one string with the options separated by line feed characters

Options stored as two-element [export display] arrays contribute their export value, which is the first element; the display text is skipped. An empty string means the field has no /Opt array

Syntax

Delphi

Function TPDFlib.GetFormFieldAllowedValues(Index: Integer): WideString;

Parameters

IndexThe index of the form field. The first form field has an index of 1

Return values

WideStringAll export values of the /Opt array joined with line feed characters, one option per line
empty stringThe field has no /Opt array or could not be found

Remarks

Assign the result to TStringList.Text to obtain one item per option without further splitting

See also

GetFormFieldType, GetFormFieldValue, SetFormFieldValue