AddFormFieldChoiceSub

Form fields

Description

Similar to the AddFormFieldSub function but allows a choice field item's export value and display value to be set

The function returns a temporary form field Index which can be used with the

SetFormFieldBounds, SetFormFieldCheckStyle and other functions

Syntax

Delphi

Function TPDFlib.AddFormFieldChoiceSub(Index: Integer; Const SubName, DisplayName: WideString): Integer;

ActiveX

Function PDFlib::AddFormFieldChoiceSub(Index As Long, SubName As String, DisplayName As String) As Long

DLL

int DLAddFormFieldChoiceSub(int InstanceID, int Index, const wchar_t * SubName, const wchar_t * DisplayName);

Parameters

IndexThe index of the form field to work with; The first form field has an index of 1; The form field must be a choice field
SubNameThe export value of the new sub-field; The value of the form field could be set to this name using the SetFormFieldValue function; The display name of the new sub-field
DisplayName

Return values

0The sub-field was not added; The specified form field may not have been a choice form field
Non-zeroA temporary field Index