THotPDF.IsFormFieldRequired Method
Determines whether a specified form field in the loaded PDF document is marked as required
Declaration
function IsFormFieldRequired(FieldIndex: Integer): boolean;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
FieldIndex | The zero-based index of the form field |
Return value
Returns True if the Required bit (bit 2) is set in the field's Ff (Field Flags); otherwise returns False
Usage notes
- Required 标志对应 PDF 规范中字段标志位的第 2 位(从 1 计数),表示提交表单前该字段必须填写
- Returns False when the index is out of range; you should confirm the total number of fields before calling
- When used with IsFormFieldNoExport and GetLoadedFormFieldFlags, the behaviour properties of the field can be fully analysed