Skip to content

Make a Gravity Forms Form Look Like a Fillable PDF (Form W-9 Example)

Build IRS Form W-9 with standard Gravity Forms fields and style it like the fillable PDF people know: ruled boxes, small printed labels, light blue fill-in areas and Part bars, with CSS only.

Chris Eggleston 13 min read

Some forms people already know by sight. A W-9 is one of them: anyone who has done freelance or contract work has filled one in, usually as a fillable PDF. When you move that form onto your website, it’s tempting to turn it into a “modern” form with big rounded inputs, and then people have to work out where line 3a went.

This tutorial builds IRS Form W-9 with standard Gravity Forms fields and then styles it so it looks like the fillable PDF: ruled boxes, the line numbers and small print in the corner of each box, light blue areas to type in, square checkboxes and the black Part I and Part II bars. The entries are normal Gravity Forms entries, so notifications, conditional logic and add-ons all keep working.

A Gravity Forms form styled like IRS Form W-9: the form number, title and Give form to the requester header, then lines 1 to 5 in ruled boxes with light blue fill-in areas, the 3a tax classification boxes on one line with Individual/sole proprietor checked, and the requester address box
The finished form. Everything is a standard Gravity Forms field; the look is CSS.

What You Need

  • Gravity Forms with the default Orbital form theme.
  • The Signature Add-On for the “Sign Here” box. It comes with the Elite license (see Gravity Forms Pricing). Without it, use a Single Line Text field labeled “Signature (type your full name)”.
  • A place to add CSS: a CSS snippet in WPCode Box, or Appearance → Customize → Additional CSS.

Step 1: Map the PDF to Fields

Open the PDF next to the form editor and go row by row. Each box on the paper form becomes one field, and boxes that sit side by side become fields in the same row of the column layout. Use the printed wording, line number included, as the field label: that’s what makes it feel like the real form.

W-9Gravity Forms fieldNotes
HeaderHTMLForm number, title and “Give form to the requester” (markup below)
Line 1, Line 2Single Line TextFull width. Line 1 required
Line 3aRadio Buttons, 7 choicesCSS class w9-inline-choices puts them on one line
LLC classification, OtherSingle Line Text × 2Half width each, conditional logic: show when 3a is LLC / Other
Line 3bCheckboxes, 1 choiceLong print goes in the Description, set to show above
Line 4Single Line Text × 2Half width each, CSS class w9-short
Line 5 + RequesterSingle Line Text + HTML8 and 4 columns
Line 6 + Line 7Single Line Text × 28 and 4 columns
Part I barHTMLBlack “Part I” tag and the TIN instructions
SSN or EINRadio Buttons + 2 Single Line TextInput masks 999-99-9999 and 99-9999999, each shown for its choice, CSS class w9-digits
Part IIHTMLThe certification text
Sign Here, DateSignature + Date8 and 4 columns. Date default value {date_mdy}

Step 2: Build the Header and Part Bars

The top of the form and the Part I and Part II bars aren’t inputs, so they’re HTML fields. Paste this markup into them and give the header field the CSS class w9-cell-head and the Part bars w9-cell-part (field Appearance tab). The CSS in Step 5 styles these class names:

<!-- Field 1: HTML field "Form header" (CSS Class: w9-cell-head) -->
<div class="w9-head">
  <div class="w9-formno"><span class="w9-form">Form</span> <span class="w9-big">W-9</span><span class="w9-rev">(Rev. March 2024)</span><span class="w9-dept">Department of the Treasury<br>Internal Revenue Service</span></div>
  <div class="w9-title"><strong>Request for Taxpayer<br>Identification Number and Certification</strong><span>Go to <em>www.irs.gov/FormW9</em> for instructions and the latest information.</span></div>
  <div class="w9-give"><strong>Give form to the requester.</strong> Do not send to the IRS.</div>
</div>
<p class="w9-begin"><strong>Before you begin.</strong> For guidance related to the purpose of Form W-9, see Purpose of Form in the instructions.</p>

<!-- Part bars: HTML fields (CSS Class: w9-cell-part) -->
<div class="w9-part"><span class="w9-part-tag">Part I</span><span class="w9-part-title">Taxpayer Identification Number (TIN)</span></div>
<p class="w9-note">Enter your TIN in the appropriate box. ...</p>

<!-- Requester box: HTML field next to line 5 -->
<span class="w9-label">Requester's name and address (optional)</span>
<div class="w9-requester">Your Business<br>123 Main St<br>City, ST 00000</div>

The Part II field holds the certification statements as a numbered list (<ol class="w9-cert">). Copy them word for word from the current form on irs.gov.

Step 3: Add the Fields in Rows

Add the fields in order, then drag the ones that share a row next to each other and drag their edges to set the widths. A few details make a big difference:

  • Admin Field Labels. The printed labels are long. Give each field a short Admin Field Label (“1 Name”, “3a Tax classification”) so your entries and merge tags stay readable.
  • Conditional logic. The LLC classification box only shows when 3a is LLC, the “Other” box only for Other, and the SSN or EIN box only for the type picked. Make them required: hidden fields aren’t checked.
  • Input masks. On the SSN and EIN fields, turn on Input Mask and choose Custom: 999-99-9999 and 99-9999999.
  • Required indicator. In Form Settings, set the Required Field Indicator to Asterisk so “(Required)” doesn’t crowd the small labels.
The Gravity Forms editor showing the line 4 exemption fields side by side, line 5 Address next to the Requester HTML field, and line 6 next to line 7. Field Settings shows Single Line Text, ID 10.
Line 5 and the Requester box share a row, and so do lines 6 and 7.

Step 4: Add the CSS Class

Go to Form Settings → Form Layout and set CSS Class Name to gr-paper-form. Gravity Forms adds gr-paper-form_wrapper to the form’s wrapper, and every rule in the CSS starts with it, so no other form on your site changes.

Form Settings with the Required Field Indicator set to Asterisk and the CSS Class Name set to gr-paper-form
The CSS class switches the fillable PDF styles on for this form only.

Step 5: Add the CSS

Add this as a CSS snippet in WPCode Box (or in Additional CSS):

/* ==========================================================
   Gravity Forms: make a form look like a fillable PDF.
   Add the CSS class "gr-paper-form" to the form
   (Form Settings > Form Layout > CSS Class Name).
   ========================================================== */

.gr-paper-form_wrapper.gform_wrapper {
	--gr-ink: #111;
	--gr-fill: #e8effc;        /* Acrobat-style light blue fill-in area */
	--gr-fill-focus: #fff;
	--gr-focus: #1e5bff;
	--gf-form-gap-x: 0;
	--gf-form-gap-y: 0;
	--gf-ctrl-label-font-size-primary: 11px;
	--gf-ctrl-label-font-weight-primary: 400;
	--gf-ctrl-label-color-primary: var(--gr-ink);
	--gf-ctrl-label-font-size-secondary: 11px;
	--gf-ctrl-desc-font-size: 10.5px;
	--gf-ctrl-desc-color: #333;
	--gf-field-choice-gap: 4px;
	max-width: 880px;
	margin: 0 auto;
	padding: 28px 30px 30px;
	background: #fff;
	color: var(--gr-ink);
	font-family: Helvetica, Arial, sans-serif;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 10px 30px rgba(0, 0, 0, .10);
}

/* "* indicates required fields" */
.gr-paper-form_wrapper .gform_required_legend {
	font-size: 11px;
	margin: 0 0 6px;
	text-align: right;
}

/* The ruled grid: the field list draws the top, left and right edge, each field draws its right and bottom line. */
.gr-paper-form_wrapper .gform_fields {
	border-top: 2px solid var(--gr-ink);
	border-left: 1px solid var(--gr-ink);
	box-shadow: inset -1px 0 0 var(--gr-ink);
	border-bottom: 1px solid var(--gr-ink);
}
.gr-paper-form_wrapper .gfield {
	border-right: 1px solid var(--gr-ink);
	border-bottom: 1px solid var(--gr-ink);
	margin: 0;
	padding: 4px 7px 5px;
	min-width: 0;
}
.gr-paper-form_wrapper .gfield:last-child { border-bottom: 0; }

/* Labels: small print in the corner of each box, like the printed form. */
.gr-paper-form_wrapper .gfield_label,
.gr-paper-form_wrapper legend.gfield_label,
.gr-paper-form_wrapper .w9-label {
	display: block;
	font-family: inherit;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--gr-ink);
	margin: 0 0 3px;
	padding: 0;
}
.gr-paper-form_wrapper .gfield_required { color: #c00; font-size: 11px; }
.gr-paper-form_wrapper .gfield_description {
	font-size: 10.5px;
	line-height: 1.35;
	color: #333;
	padding: 0 0 4px;
}

/* Fill-in areas: flat, no borders, light blue like a PDF form field. */
.gr-paper-form_wrapper input[type="text"],
.gr-paper-form_wrapper input[type="email"],
.gr-paper-form_wrapper input[type="tel"],
.gr-paper-form_wrapper input[type="number"],
.gr-paper-form_wrapper select,
.gr-paper-form_wrapper textarea {
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: var(--gr-fill) !important;
	color: var(--gr-ink);
	font-family: "Courier New", Courier, monospace;
	font-size: 15px;
	min-block-size: 28px;
	padding: 3px 7px !important;
}
.gr-paper-form_wrapper input:focus,
.gr-paper-form_wrapper select:focus,
.gr-paper-form_wrapper textarea:focus {
	background: var(--gr-fill-focus) !important;
	outline: 2px solid var(--gr-focus) !important;
	outline-offset: -2px;
}

/* Checkboxes and radio buttons: small square boxes. */
.gr-paper-form_wrapper .gfield-choice-input {
	border: 1px solid var(--gr-ink) !important;
	border-radius: 0 !important;
	background: var(--gr-fill) !important;
	box-shadow: none !important;
	inline-size: 14px !important;
	block-size: 14px !important;
}
.gr-paper-form_wrapper .gfield-choice-input::before {
	border-radius: 0 !important;
	color: var(--gr-ink) !important;
	background: var(--gr-ink) !important;
	inline-size: 8px !important;
	block-size: 8px !important;
	content: "" !important;
}
.gr-paper-form_wrapper .gfield-choice-input:checked::before { display: block; }
.gr-paper-form_wrapper .gchoice label {
	font-size: 12px;
	color: var(--gr-ink);
}
.gr-paper-form_wrapper .gchoice { gap: 6px; }

/* Choices on one line (3a). Add the CSS class "w9-inline-choices" to the field. */
.gr-paper-form_wrapper .w9-inline-choices .gfield_radio,
.gr-paper-form_wrapper .w9-inline-choices .gfield_checkbox {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap;
	gap: 6px 22px !important;
}

/* Short code boxes (one or two characters). */
.gr-paper-form_wrapper .w9-short input { max-inline-size: 90px; }

/* Digit boxes for the SSN and EIN: one character per printed box. */
.gr-paper-form_wrapper .w9-digits input {
	font-size: 18px;
	letter-spacing: .55em;
	max-inline-size: 260px;
}

/* ---------- Form header: form number | title | "give to requester" ---------- */
.gr-paper-form_wrapper .w9-cell-head { padding: 0 !important; }
.gr-paper-form_wrapper .w9-head {
	display: grid;
	grid-template-columns: 150px 1fr 150px;
	border-bottom: 1px solid var(--gr-ink);
}
.gr-paper-form_wrapper .w9-head > div { padding: 6px 8px; }
.gr-paper-form_wrapper .w9-formno { border-right: 2px solid var(--gr-ink); font-size: 10px; line-height: 1.3; }
.gr-paper-form_wrapper .w9-form { font-size: 11px; vertical-align: top; }
.gr-paper-form_wrapper .w9-big { font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.gr-paper-form_wrapper .w9-rev,
.gr-paper-form_wrapper .w9-dept { display: block; margin-top: 4px; }
.gr-paper-form_wrapper .w9-title { text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.gr-paper-form_wrapper .w9-title strong { font-size: 19px; line-height: 1.2; }
.gr-paper-form_wrapper .w9-title span { font-size: 11px; }
.gr-paper-form_wrapper .w9-give { border-left: 2px solid var(--gr-ink); font-size: 11px; line-height: 1.35; display: flex; align-items: center; }
.gr-paper-form_wrapper .w9-give strong { display: contents; }
.gr-paper-form_wrapper .w9-begin { font-size: 11px; margin: 0; padding: 4px 8px; }

/* ---------- Part I / Part II bars ---------- */
.gr-paper-form_wrapper .w9-cell-part { padding: 0 !important; }
.gr-paper-form_wrapper .w9-part {
	display: flex;
	align-items: stretch;
	border-top: 1px solid var(--gr-ink);
	border-bottom: 1px solid var(--gr-ink);
	font-size: 13px;
	font-weight: 700;
}
.gr-paper-form_wrapper .gfield:first-child .w9-part,
.gr-paper-form_wrapper .w9-cell-part .w9-part { border-top: 0; }
.gr-paper-form_wrapper .w9-part-tag { background: var(--gr-ink); color: #fff; padding: 3px 12px; margin-right: 14px; }
.gr-paper-form_wrapper .w9-part-title { padding: 3px 0; }
.gr-paper-form_wrapper .w9-note { font-size: 11px; line-height: 1.4; margin: 5px 8px; }
.gr-paper-form_wrapper .w9-cert { font-size: 11px; line-height: 1.4; margin: 0 8px 4px 28px; padding: 0; }
.gr-paper-form_wrapper .w9-cert li { margin: 0 0 3px; }

/* Requester box */
.gr-paper-form_wrapper .w9-requester { font-family: "Courier New", Courier, monospace; font-size: 13px; line-height: 1.4; }

/* Signature: a ruled line to sign on instead of the dashed box. */
.gr-paper-form_wrapper .w9-sign .gfield_label { font-weight: 700; }
.gr-paper-form_wrapper .w9-sign .gfield_signature_container,
.gr-paper-form_wrapper .w9-sign canvas {
	border: 0 !important;
	border-radius: 0 !important;
	background: var(--gr-fill) !important;
}

/* Submit button: plain and square. */
.gr-paper-form_wrapper .gform_footer { padding: 16px 0 0; margin: 0; }
.gr-paper-form_wrapper .gform_button {
	background: var(--gr-ink) !important;
	border-radius: 0 !important;
	font-family: inherit;
	font-weight: 700;
	padding: 10px 22px !important;
}

/* Footer line like the printed form */
.gr-paper-form_wrapper .gform_footer::after {
	content: "Form W-9 (Rev. 3-2024)";
	margin-left: auto;
	font-size: 11px;
	font-weight: 700;
	align-self: center;
}

/* Phones: Gravity Forms stacks the columns; tighten the header. */
@media (max-width: 640px) {
	.gr-paper-form_wrapper.gform_wrapper { padding: 14px; }
	.gr-paper-form_wrapper .w9-head { grid-template-columns: 1fr; }
	.gr-paper-form_wrapper .w9-formno,
	.gr-paper-form_wrapper .w9-give { border: 0; }
	.gr-paper-form_wrapper .w9-title { border-top: 1px solid var(--gr-ink); border-bottom: 1px solid var(--gr-ink); }
}

/* Print: drop the shadow and the light blue, keep the lines. */
@media print {
	.gr-paper-form_wrapper.gform_wrapper { box-shadow: none; padding: 0; }
	.gr-paper-form_wrapper input,
	.gr-paper-form_wrapper .gfield-choice-input { background: #fff !important; }
	.gr-paper-form_wrapper .gform_footer { display: none; }
}

What it does:

  • Removes the gaps between fields with Orbital’s own variables (--gf-form-gap-x and --gf-form-gap-y), then gives every field a right and bottom border. Together they draw the ruled grid.
  • Shrinks the labels to 11px through --gf-ctrl-label-font-size-primary, so they sit in the corner of each box like the printed text.
  • Turns the inputs into fill-in areas: no border, no rounded corners, and the light blue that Acrobat uses for PDF form fields. They turn white with a blue outline while you type.
  • Makes radio buttons square, like the boxes on the paper form.
  • Stacks the header on phones (Gravity Forms already stacks the columns) and drops the shadow and blue when printed.

The footer line “Form W-9 (Rev. 3-2024)” comes from the CSS too (.gform_footer::after). Change or delete it if you reuse the styles for another form.

Step 6: Keep the TIN Out of Emails

A W-9 collects a Social Security or Employer Identification Number, and the default admin notification uses {all_fields}, which puts it in the email. Write the notification out field by field instead and leave the SSN and EIN out:

A new Form W-9 was submitted. The TIN is not included in this email; open the entry to see it.

Name (line 1): {1 Name:2}
Business name (line 2): {2 Business name:3}
Tax classification (3a): {3a Tax classification:4} {3a LLC classification:5} {3a Other:6}
Address: {5 Address:10}, {6 City, state, ZIP:12}
TIN type: {TIN type:15}
Signed: {Date signed:20}

View the entry: {entry_url}

Use the merge tag button to insert your own fields; the numbers after the colon are your field IDs.

The Result

Lines 6 and 7, the black Part I bar with Social security number checked and the number blurred, the Part II certification text, a drawn signature and the date
Part I and Part II. (The test SSN is blurred in this screenshot.)

Each submission is a normal Gravity Forms entry, with the short admin labels you set:

Entry 740 for the Form W-9 (Fillable PDF Style) form, with fields named 1 Name, 2 Business name, 3a Tax classification, 5 Address and 6 City, state, ZIP, and the New W-9 (no TIN) notification
The entry, and the notification that leaves the TIN out.

Need the Actual PDF Filled In? Use Fillable PDFs

Everything above makes a web form look like the PDF. What you get back is still a Gravity Forms entry. If your accountant, a client or a government office needs the real document, a completed W-9 as a PDF file, that is a different job, and it is the one Fillable PDFs for Gravity Forms by Cosmic Giant was built for.

Fillable PDFs takes the original PDF, fills its fields with the entry data on every submission and saves the finished file. According to Cosmic Giant’s feature list it:

  • Fills the real PDF. Upload the PDF with its fillable fields as a template, map each form field to a PDF field in a visual mapper, and every submission produces a completed copy of the original document.
  • Builds the form for you. On the Professional and Agency plans you can import a fillable PDF and it detects the fields and creates the Gravity Forms form from them, which replaces most of Step 1 and Step 3 above.
  • Handles signatures and images. A drawn signature from the form can be placed in the PDF’s signature box.
  • Controls who gets the file. Attach the PDF to a notification, or keep it on your site behind a download link that can be limited to the person who submitted the form or protected with a password. For a W-9 that is a better fit than emailing a tax ID.
  • Sends different documents from one form using Gravity Forms conditional logic, and can wait until a payment is collected.

The two approaches work well together: style the form with the CSS from this tutorial so it feels familiar to fill in, then let Fillable PDFs produce the official copy.

This tutorialWith Fillable PDFs
What the visitor fills inA web form that looks like the PDFThe same web form
What you end up withA Gravity Forms entryThe entry plus the completed original PDF
Good forCollecting the informationFiling, sending or archiving the official document
CostGravity Forms onlyFrom $180 a year

Pricing in November 2026 is $180 a year for Personal (3 sites, 10 templates), $300 for Professional (5 sites, 100 templates) and $420 for Agency (25 sites, 200 templates), with unlimited PDF generation on every plan and a 30-day money-back guarantee. Importing a PDF to create the form, and sending files to Dropbox or Google Drive, need Professional or higher. Cosmic Giant is a Gravity Forms Certified Developer. I have not tested Fillable PDFs for this tutorial; the details here come from their feature and pricing pages.

See Fillable PDFs for Gravity Forms →

Things to Know

  • Treat the TIN as sensitive. Keep it out of emails (Step 6), only give entry access to the people who need it, and use Form Settings → Personal Data to delete old entries automatically. Your site should be on HTTPS.
  • Check the official form. A requester can use its own version of the W-9 as long as it is substantially similar to the IRS form. Compare yours with the current form at irs.gov/FormW9 whenever the IRS revises it.
  • Phones stack the boxes. Gravity Forms puts each column on its own row on small screens, so the form reads top to bottom like a long version of the PDF.
  • Accessibility. Gravity Forms points out that “(Required)” is clearer than an asterisk for some people. The asterisk keeps the PDF look; switch back to Text if that matters more for your audience.
  • Reuse it for other forms. Nothing in the CSS is W-9 only except the footer line and the class names starting with w9-. Change the HTML fields and you can do an I-9 section, a vendor setup form or a permit application the same way.

Download the Form Template

It’s free. Get the W-9 form from this tutorial with the CSS and setup notes, ready to import.

This field is for validation purposes and should be left unchanged.
Name*(Required)

Need More Help?

If you still need help, use the chat or leave a comment below and we’ll get back to you.

Comments

Ask a question or leave a comment

Your email is never shown. For help with a specific form, share what you expected and what happened instead.