SetFormFieldChoiceSub

Form fields

Description

Sets the export and display values of an existing sub-field that is part of a choice form field. If the display value is an empty string then it will be set to the same string as the export value.

The AddFormFieldChoiceSub function can be used to change a sub-field entry in an existing choice form field.

Syntax

Delphi

function TPDFlib.SetFormFieldChoiceSub(Index, SubIndex: Integer; Const SubName, DisplayName: WideString): Integer;

ActiveX

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

DLL

int DLSetFormFieldChoiceSub(int InstanceID, int Index, int SubIndex, wchar_t * SubName, wchar_t * DisplayName);

Parameters

IndexThe index of the choice form field
SubIndexThe index of the sub-field. The first sub-field has an index of 1.
SubNameThe export value of the new sub-field.
DisplayNameThe display value of the new sub-field.

Return values

0The sub-field was not added. The specified form field may not have been a choice form field.
1The form field was updated successfully.