API referencePDF/A & Conformance

pdfAddFieldToFormAction

Add a field to an already-created SubmitForm/

C
int32_t __stdcall pdfAddFieldToFormAction(PPDF IPDF, uint32_t Action, uint32_t AField, BOOL32 Include);
int32_t __stdcall pdfAddFieldToHideAction(PPDF IPDF, uint32_t HideAct, uint32_t AField);
Delphi
function pdfAddFieldToFormAction(const IPDF: PPDF; Action, AField: Cardinal; Include: LongBool): Integer; stdcall;
function pdfAddFieldToHideAction(const IPDF: PPDF; HideAct, AField: Cardinal): Integer; stdcall;

Purpose. Add a field to an already-created SubmitForm/ ResetForm-style action's field list, or to a Hide action's field list.

Description. Confirmed literal duplicate wrappers: both call the exact same AddFieldToActionH(ActHandle, AField) — there is no distinct "hide action" vs. "form action" logic; the two ABI names exist purely for semantic clarity at the call site, not because the underlying mechanism differs. pdfAddFieldToFormAction's Include parameter is accepted by the ABI but not passed to AddFieldToActionH at all — every field added via either function is simply appended to the action's field list (FActFields[ActHandle-1]); there's no honored Include-vs-Exclude semantic (the standard SubmitForm/ResetForm "these fields only" vs. "all except these fields" distinction) at this layer despite the parameter strongly implying one exists.

Parameters.

ParameterDescription
IPDFDocument handle.
Action / HideActThe target action's handle (must already exist, 1..FActCount).
AFieldField handle to append to the action's field list.
Include*(FormAction only)* Accepted but never used — no Include/Exclude distinction is honored here.

Return value. The new field count in the action's list on success; -1 if Action/HideAct doesn't resolve.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfAddFieldToFormAction(IntPtr IPDF, uint Action, uint AField, [MarshalAs(UnmanagedType.Bool)] bool Include);
Area
PDF/A & Conformance
Category

Forms

Exported names

pdfAddFieldToFormAction

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.