LogoDOCS
OverviewAuthenticationRate LimitsErrors
Logo
Sign in →

PDF Fillable Fields From HTML

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.

Supported Fields

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 TypeDescriptionCustom AttributesStandard 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.
  • pdfgate-role
  • pdfgate-optional
  • pdfgate-description
  • pdfgate-form-ignore
  • pdfgate-font-size
  • pdfgate-border-width
  • pdfgate-max-length
  • pdfgate-font
  • pdfgate-border-color
  • pdfgate-text-color
  • pdfgate-background-color
  • name
  • value
  • disabled
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.
  • pdfgate-role
  • pdfgate-optional
  • pdfgate-description
  • pdfgate-form-ignore
  • pdfgate-font-size
  • pdfgate-border-width
  • pdfgate-font
  • pdfgate-border-color
  • pdfgate-text-color
  • pdfgate-background-color
  • name
  • value
  • disabled
input[type='datetime-local']
  • Accepted format tokens:
    yyyy
    yy
    mm
    dd
    HH
    hh
    MM
    tt
    ss
  • Default format (if not provided):
    yyyy-mm-dd HH:MM
  • The value should follow the standard
    datetime-local
    input format (e.g., 2025-10-13T15:30:43 or 2022-11-13T11:30). If the value is valid, the PDF field will be pre-filled in the given or default format. If the value is invalid, it will be safely ignored and displayed as an empty field in the PDF.
  • pdfgate-role
  • pdfgate-auto-fill
  • pdfgate-optional
  • pdfgate-description
  • pdfgate-form-ignore
  • pdfgate-font-size
  • pdfgate-border-width
  • pdfgate-font
  • pdfgate-border-color
  • pdfgate-text-color
  • pdfgate-background-color
  • pdfgate-datetime-format
  • name
  • value
  • disabled
input[type='date']
  • Accepted format tokens:
    yyyy
    yy
    mm
    dd
  • Default format (if not provided):
    yyyy-mm-dd
  • The value should follow the standard HTML
    date
    format (e.g., 2025-10-13). If the value is valid, it will be pre-filled in the PDF. Otherwise, it will be safely ignored and displayed as an empty field.
  • pdfgate-role
  • pdfgate-optional
  • pdfgate-description
  • pdfgate-form-ignore
  • pdfgate-font-size
  • pdfgate-border-width
  • pdfgate-font
  • pdfgate-border-color
  • pdfgate-text-color
  • pdfgate-background-color
  • pdfgate-datetime-format
  • name
  • value
  • disabled
input[type='time']
  • Accepted format tokens:
    HH
    hh
    MM
    tt
    ss
  • Default format (if not provided):
    HH:MM
  • The value should follow the standard HTML
    time
    input format (e.g., 15:30:43 or 11:30). If the value is valid, it will be pre-filled in the PDF. Otherwise, it will be safely ignored and displayed as an empty field.
  • pdfgate-role
  • pdfgate-optional
  • pdfgate-description
  • pdfgate-form-ignore
  • pdfgate-font-size
  • pdfgate-border-width
  • pdfgate-font
  • pdfgate-border-color
  • pdfgate-text-color
  • pdfgate-background-color
  • pdfgate-datetime-format
  • name
  • value
  • disabled
select
  • The text content of each
    <option>
    tag is used as the option value.
  • Disabled options are filtered out.
  • For multiselect fields, all options marked with the
    selected
    attribute will be pre-selected in the generated PDF.
  • Note: multiselect filling is not supported on our digital-signature feature
  • pdfgate-role
  • pdfgate-optional
  • pdfgate-description
  • pdfgate-form-ignore
  • pdfgate-font-size
  • pdfgate-border-width
  • pdfgate-font
  • pdfgate-border-color
  • pdfgate-text-color
  • pdfgate-background-color
  • name
  • value
  • disabled
  • multiple
input[type='checkbox']
If the HTML input is checked, the corresponding PDF field will appear checked as well.
  • pdfgate-role
  • pdfgate-optional
  • pdfgate-description
  • pdfgate-form-ignore
  • pdfgate-border-width
  • pdfgate-border-color
  • pdfgate-text-color
  • pdfgate-background-color
  • name
  • value
  • disabled
  • checked
input[type='radio']
  • If the HTML radio input is checked, the corresponding PDF field will appear checked as well.
  • Radio inputs sharing the same
    name
    behave as a group.
  • When using
    pdfgate-description
    , set it on the first radio input in the group — only the first button's description is shown in the signing UI.
  • pdfgate-role
  • pdfgate-optional
  • pdfgate-description
  • pdfgate-form-ignore
  • pdfgate-border-width
  • pdfgate-border-color
  • pdfgate-text-color
  • pdfgate-background-color
  • name
  • value
  • disabled
  • checked
<pdfgate-signature-field />
  • Defines a field in the PDF where a recipient can provide their signature. Primarily used with the digital signatures feature to collect signatures in the signing UI. It is also compatible with standard PDF tools such as Adobe Acrobat.
  • pdfgate-role
  • pdfgate-optional
  • pdfgate-description
  • name

Custom Attributes

Below is a list of all the custom PDFGate attributes you can apply to your HTML inputs to customize the PDF fields.

AttributeDescriptionExample
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.
1<input type="text" pdfgate-role="client" />2<input type="text" pdfgate-role="manager" />
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.
1<input type='datetime-local' pdfgate-auto-fill='true' />
pdfgate-form-ignore
Excludes the element from being generated as a fillable PDF field. The field will appear as static content.
1<input type='text' pdfgate-form-ignore='true' />
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.
1<input type='text' pdfgate-optional='true' />2<pdfgate-signature-field pdfgate-optional='true'></pdfgate-signature-field>
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.
1<input type='text' name='fullName' pdfgate-description='Enter your full legal name as it appears on your ID' />2<pdfgate-signature-field pdfgate-description='Sign here to confirm you agree to the terms above'></pdfgate-signature-field>
pdfgate-font-size
Sets the font size of the field. If not specified, it is automatically calculated based on the field size.
1<input type='text' pdfgate-font-size='12' />
pdfgate-border-width
Sets the border width of the field in PDF points.
1<input type='text' pdfgate-border-width='3' />
pdfgate-max-length
Sets the maximum number of characters the field can accept (when applicable).
1<textarea rows='4' pdfgate-max-length='400'></textarea>
pdfgate-font
Sets the font used for the field text.
Accepted values:
  • times-bold
  • times-italic
  • times-bolditalic
  • helvetica
  • helvetica-bold
  • helvetica-oblique
  • helvetica-boldoblique
  • courier
  • courier-bold
  • courier-oblique
  • courier-boldoblique
1<input type='text' pdfgate-font='courier-boldoblique' />
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
).
1<input type='text' pdfgate-border-color='#a84d6a' pdfgate-border-width='1' />
pdfgate-text-color
Sets the text color. Accepts hex, RGB, or named colors.
1<input type='text' pdfgate-text-color='#a84d6a' />
pdfgate-background-color
Sets the background color. Accepts hex, RGB, or named colors.
1<input type='text' pdfgate-background-color='#a84d6a' />
pdfgate-datetime-format
Defines the display format for
datetime-local
,
date
,
time
fields (e.g.,
dd/mm/yyyy HH:MM:ss
).
Supported format tokens:
  • yyyy – Full year
  • yy – Two-digit year
  • mm – Month
  • dd – Day of the month
  • HH – Hours in 24-hour format
  • hh – Hours in 12-hour format (if hh is used, include tt as well)
  • MM – Minutes
  • tt – Time period indicator (AM or PM)
  • ss – Seconds
1<input type='datetime-local' pdfgate-datetime-format='mm/dd/yy hh:MM:ss tt' />
Note

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.

Standard HTML Attributes

Below is a list of all the standard HTML input attributes that the PDFGate API considers when creating PDF fillable fields.

AttributeDescriptionExample
name
Sets the name of the PDF field. If not provided, an incremental name is assigned based on the field type.
1<input type='text' name='textField' />
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.
1<input type='text' value='value' />
multiple
It can be used on a
select
element and creates a multiselect component instead of a dropdown.
1<select id="fruits" name="fruits[]" multiple size="5">2    <optgroup label="Citrus">3        <option value="orange" selected>Orange</option>4        <option value="lemon">Lemon</option>5    </optgroup>6    <optgroup label="Berries">7        <option value="strawberry" selected>Strawberry</option>8        <option value="blueberry">Blueberry</option>9    </optgroup>10</select>
disabled
Marks the field as disabled in the PDF.
1<input type='text' disabled />
checked
Marks the checkbox or radio button as checked.
1<input type='checkbox' name='skill' value='Java' checked />
selected
Used in HTML
select
elements and marks the specified
option
as selected by default.
1<option value='orange' selected>Orange</option>