This page documents the supported HTML input types and custom attributes for generating fillable PDF fields from HTML using our API. For detailed usage examples, see the Fillable Fields guide.
Below is a list of all the available HTML input types you can convert. The Custom Attributes column defines the custom PDFGate attributes you can use for each input type, while the Standard HTML Attributes column describes the standard HTML attributes that the API uses to customize the PDF fillable fields.
| Field Type | Description | Custom Attributes | Standard HTML Attributes |
|---|---|---|---|
input[type='text'] input[type='email'] input[type='tel'] textarea | These elements share the same behavior and are used to create standard text-based input fields in the generated PDF. Inputs with no type attribute (<input />) are also treated as text fields. |
|
|
input[type='number'] | This element will create a numeric input field in the generated PDF, allowing the user to enter or view a numerical value. |
|
|
input[type='datetime-local'] |
|
|
|
input[type='date'] |
|
|
|
input[type='time'] |
|
|
|
select |
|
|
|
input[type='checkbox'] | If the HTML input is checked, the corresponding PDF field will appear checked as well. |
|
|
input[type='radio'] |
|
|
|
<pdfgate-signature-field /> |
|
|
|
Below is a list of all the custom PDFGate attributes you can apply to your HTML inputs to customize the PDF fields.
| Attribute | Description | Example |
|---|---|---|
pdfgate-role | Used in the digital signatures feature when your document includes multiple recipients. Specifies which recipient a field belongs to. The value must match the recipient.role parameter defined when creating the envelope. | |
pdfgate-auto-fill | Automatically fills the field with the current datetime when the document is signed. Used in the digital signatures feature to populate signing timestamps without requiring user input. Values are generated on the server in UTC. | |
pdfgate-form-ignore | Excludes the element from being generated as a fillable PDF field. The field will appear as static content. | |
pdfgate-optional | Marks the field as optional in the digital signatures workflow. By default, all fields (including signature fields) are required. Adding this attribute makes the field optional, meaning recipients are not required to fill it in before completing the document. | |
pdfgate-description | Adds a description to the field, displayed to the recipient in the signing UI to provide context or instructions for that specific field. | |
pdfgate-font-size | Sets the font size of the field. If not specified, it is automatically calculated based on the field size. | |
pdfgate-border-width | Sets the border width of the field in PDF points. | |
pdfgate-max-length | Sets the maximum number of characters the field can accept (when applicable). | |
pdfgate-font | Sets the font used for the field text. Accepted values:
| |
pdfgate-border-color | Sets the border color. Accepts standard hex (e.g., #eb4034 ), RGB (e.g., rgb(235, 64, 52) ), or named colors (e.g., blue , transparent ). | |
pdfgate-text-color | Sets the text color. Accepts hex, RGB, or named colors. | |
pdfgate-background-color | Sets the background color. Accepts hex, RGB, or named colors. | |
pdfgate-datetime-format | Defines the display format for Supported format tokens:datetime-local , date , time fields (e.g., dd/mm/yyyy HH:MM:ss ).
| |
The fields pdfgate-datetime-format and pdfgate-max-length may not work as expected in all PDF readers. They are fully supported in readers that allow embedded JavaScript, such as Adobe Acrobat.
Below is a list of all the standard HTML input attributes that the PDFGate API considers when creating PDF fillable fields.
| Attribute | Description | Example |
|---|---|---|
name | Sets the name of the PDF field. If not provided, an incremental name is assigned based on the field type. | |
value | Pre-fills the PDF field with the specified value. Also used in the digital signatures feature to prefill the field in the signing UI. | |
multiple | It can be used on a select element and creates a multiselect component instead of a dropdown. | |
disabled | Marks the field as disabled in the PDF. | |
checked | Marks the checkbox or radio button as checked. | |
selected | Used in HTML select elements and marks the specified option as selected by default. | |