SetFormFieldArbitraryMask

Form fields, actions

Description

Adds an AFSpecial_KeystrokeEx action containing a custom input mask

Syntax

Function TPDFlib.SetFormFieldArbitraryMask(Index: Integer; Const Mask: WideString): Integer;

Parameters

IndexOne-based form-field index that receives the keystroke action
MaskNon-empty AFSpecial_KeystrokeEx pattern; quotes, backslashes, control characters and JavaScript line separators are escaped before the script is stored

Return values

1The keystroke action was added to the field
0Mask is empty, the field index is invalid, or the action cannot be stored

Remarks

Quotes, backslashes, control characters and JavaScript line separators are escaped before the script is stored

An empty mask is rejected without changing the field

See also

SetFormFieldSpecialFormat