SetFormFieldTitle

Form fields

Description

Renames the title of a form field. No validation is performed so you should make sure the title is unique. A field inside a hierarchy accepts its fully-qualified name: only the part after the last full stop is written to the field's own /T entry, because ISO 32000-1 §12.7.3.2 forbids a full stop inside a partial field name, whilst the parent chain keeps supplying the prefix

Syntax

Delphi

Function TPDFlib.SetFormFieldTitle(Index: Integer; NewTitle: WideString): Integer;

ActiveX

Function PDFlib::SetFormFieldTitle(Index As Long, NewTitle As String) As Long

DLL

int DLSetFormFieldTitle(int InstanceID, int Index, const wchar_t* NewTitle);
int DLSetFormFieldTitleA(int InstanceID, int Index, const char* NewTitle);

Parameters

IndexThe index of the formfield
NewTitleThe new title name for the formfield

Return values

0The form field title could not be changed
1The field title was changed successfully

Remarks

Passing Parent.Child for a field below Parent renames the leaf and leaves the field within its hierarchy; passing the bare leaf name has the same effect

Use SetFormFieldChildTitle when all you have is the leaf name

See also

RenameFormField, GetFormFieldTitle, GetFormFieldChildTitle