AddFormFieldSub

Form fields

Description

Adds a sub-field to the specified radio-button or choice form field.

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

SetFormFieldBounds, SetFormFieldCheckStyle and other functions.

To set a choice item's export value and display value use the AddFormFieldChoiceSub function.

Syntax

Delphi

function TPDFlib.AddFormFieldSub(Index: Integer; Const SubName: WideString): Integer;

ActiveX

Function PDFlib::AddFormFieldSub(Index As Long, SubName As String) As Long

DLL

int DLAddFormFieldSub(int InstanceID, int Index, wchar_t * SubName);

Parameters

IndexThe index of the form field to work with. The first form field has an index of 1. The name of the new sub-field. The value of the form field could be set to this name using the SetFormFieldValue function.
SubName

Return values

0The sub-field was not added. The specified form field may not have been a radio-button or choice form field.
Non-zeroA temporary field Index