🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 31, 2026

How to Build a Matrix Grid in Gravity Forms (Rows, Typed Columns and Live Totals)

GravityExtra
How to Build a Matrix Grid in Gravity Forms (Rows, Typed Columns and Live Totals)

Many forms ask a question that is really a table. A timesheet asks for hours per project per day. A team order asks for quantities per size and colour. A survey of a house asks for measurements room by room, a budget request asks for amounts per month, and a skills review asks for a rating and a note per skill. You can build each of these from separate fields, but you end up with forty boxes, a form that is hard to read, and totals you have to add up by hand.

This guide shows how to build these tables properly in Gravity Forms: one field with fixed, labelled rows and typed columns, live totals, server-side checks and totals you can calculate with. We use the Gravity Forms Matrix Grid add-on, and we also explain when the built-in options are the better choice.

What a matrix grid field is

A matrix grid is a table where you decide the rows and the columns in advance. Each row has a label (“Website redesign”, “Kitchen”, “Small”), and each column has a label and a type. A Mon column takes a number of hours, a Rate column takes an amount of money, a Status column is a drop-down, a Billable column is a single tick, a Due column is a date and a Notes column is free text. Visitors fill in the cells they need, and the grid adds up the numeric columns into a total per row, a total per column and a grand total.

Because the rows are fixed, every entry has the same shape. That makes entries easy to compare, easy to export to a spreadsheet and easy to use in calculations: “the hours for Website redesign on Monday” is always the same cell.

How it differs from the official Gravity Forms add-ons

Gravity Forms has two table-like inputs of its own, and it is worth knowing exactly what each one does before you choose.

The Survey Add-On Likert field

The Likert field, including its multi-row version, lists statements as rows and a shared scale as columns, such as “Strongly disagree” to “Strongly agree”. Visitors pick one radio choice per row. It is excellent for opinion surveys and it can score the answers, but every cell is a radio button: there are no number, money, text or date cells, no row or column totals, and no way to use a single cell in a calculation.

The core List field

The List field lets visitors add as many rows as they want, each made of text boxes, with optional column headings. It is the right tool for open-ended lists such as “list your previous employers”. You cannot fix the rows or give them labels, the columns have no types (everything is text), and nothing adds up.

Matrix Grid

Matrix Grid sits between the two. You set fixed, labelled rows like the Likert field, but each column has its own type: text, number, currency, drop-down, a single checkbox, a radio choice across the row, or a date. Numeric columns produce row, column and grand totals, and every cell and total is available as a merge tag in Number field calculations, in conditional logic and in notifications. Every cell is checked again on the server when the form is submitted.

And our List Field Pro add-on

If you like the List field but need typed columns (drop-downs, numbers, dates) on rows that visitors add themselves, that is what our List Field Pro add-on does. The simple rule: when the number of rows is up to the visitor, use the List field or List Field Pro; when the rows are known in advance and you want totals, use Matrix Grid.

Five tables you can build in minutes

  • Weekly timesheet: projects as rows, weekdays as number columns (0 to 24 hours in quarter-hour steps), a Billable tick and a Notes column. Row totals give hours per project, column totals hours per day, and the grand total the week.
  • Team order: sizes as rows and colours as number columns with whole-number steps. The grand total is the number of shirts, and a Number field multiplies it by the unit price.
  • Room survey: rooms as rows, with Length and Width number columns, a Floor drop-down, a Painted tick and a Done by date.
  • Monthly budget: budget lines as rows and months as currency columns, with column totals per month and a grand total for the year.
  • Skills self-rating: skills as rows, radio columns Beginner, Working and Expert with scores 1, 2 and 3, and a Notes column. The grand total becomes a score you can use in conditional logic.

Step by step: a weekly timesheet

Install and activate the add-on, then enter your licence key in Forms → Settings → Matrix Grid. Open your form, add a Matrix Grid field from Advanced Fields and call it Hours.

In the field settings, rename the rows to your projects. If you have many, open Paste rows and paste them one per line; you can add a short value after a bar, such as Website redesign|web, to use in merge tags later. Next set up the columns: Mon, Tue and Wed as Number columns with a minimum of 0, a maximum of 24, a step of 0.25 and two decimals; a Rate column as Currency with In totals unticked (you do not want to add hours and money together); a Billable column as a checkbox with a default of ticked; and a Notes column as Text.

The grid builder in the form editor: rows with optional values, typed columns with their limits, totals and validation options, and the live preview on the left
Rows, typed columns, totals and validation in the field settings, with a live preview.

In Totals, switch on the row totals with the heading Week, the column totals with the heading Day total, and the grand total. In Validation, tick Required in every row on the Mon column and set a minimum of four filled cells. Save the form and open the page: the grid is a clean table and the totals change as you type.

A weekly timesheet grid on a desktop page: project rows, Mon to Wed hour columns, a currency rate, a billable tick and notes, with week totals, day totals and the grand total
Live week totals, day totals and the grand total on a desktop page.

Calculating with cells and totals

Every cell and total has a merge tag, listed under the grid in the builder. With the Hours field as field 7, {Hours:7:total} is the grand total, {Hours:7:row:r2} the total of the second project, {Hours:7:col:c1} the Monday total and {Hours:7:r1:c1} one single cell. You can also use row and column values or labels, so {Hours:7:web:mon} reads as “Website redesign on Monday”.

Add a Number field, tick Enable Calculation and use the tags in the formula. A Total hours field with the formula {Hours:7:total} follows the grid live. A Billable amount field could use {Hours:7:row:web} * {Hours:7:r1:c4}. The browser updates these fields as people type, and when the form is submitted Gravity Forms recalculates them on the server from the submitted cells, so nobody can send a doctored total.

Conditional logic on a total

Select the grid in a conditional logic rule and the rule compares its grand total. For a timesheet, add a text field called Overtime reason and show it only when Hours is greater than 40. It appears the moment the total passes 40 and is evaluated again on the server. For a rule on one row or column total, add a hidden Number field with that total as its formula and base the rule on it.

Validation you can trust

Each cell is checked while visitors type, and the submit button will not send the form while a visible grid has a problem. That is a convenience; the real checks happen on the server, where the add-on reads the submitted cells and applies every rule again: required cells, number ranges, steps and decimals, valid drop-down choices, real calendar dates, at least N filled cells and complete rows once started. A problem cell is highlighted with its own message, and the field shows a short list such as “Mobile app / Mon: required”. A visitor who switches off JavaScript or posts the form directly gets exactly the same answer.

Phones and accessibility

Wide tables are the usual problem with grids on phones. Matrix Grid turns each row into its own card on narrow screens, with the column name next to each cell and the row total at the bottom, so nothing scrolls sideways and the totals stay visible. On larger screens it is a semantic HTML table with a caption, column and row headers, and a hidden label for every cell, so screen readers announce “Mobile app, Mon” for the cell you are in. The arrow keys move between cells.

The same timesheet on a phone: each project row is a card with the column name beside each cell, the week total at the bottom, and a final card with the day totals and grand total
On a phone every row becomes a card with its own total.

What you get in entries, e-mails and exports

The grid is stored as JSON with a stable schema: the rows and columns with their labels at the time of the submission, the cell values and the totals. The entry screen shows it as a table, the entries list shows a compact summary such as “10 cells · Total 44”, and {Hours:7} prints the table in notifications and confirmations. When you export entries to CSV, each cell becomes its own column, followed by the row totals, the column totals and the grand total, ready for a spreadsheet or a payroll import.

The entry screen showing a submitted timesheet as a table with each project row, the hours per day, the rate, the billable ticks, the notes, the week totals, the day totals and the grand total
The entry screen shows the stored grid with its totals.

Tips for good grids

  • Keep columns few: six to eight columns read well on a desktop; on phones every row becomes a card anyway.
  • Keep money and quantities apart: untick In totals on columns that should not be added to the others, such as a rate next to hours.
  • Use row values: short values such as web or s make merge tags readable and stay the same when you rename a row label.
  • Use steps: a step of 0.25 for hours or 1 for quantities stops odd values at the source.
  • Score ratings: radio columns with scores turn a rating grid into a number you can act on.
  • Plan the export: the CSV columns are named after the grid, row and column labels, so clear labels give a clear spreadsheet.

Privacy and performance

All of this runs on your own WordPress site. The grid is plain HTML, a small stylesheet and a small script with no outside libraries, and the add-on makes no outside HTTP request beyond checking gravityextra.com for your licence and updates. For every setting in detail, read the Matrix Grid documentation.

Wrapping up

When a question is really a table, ask it as a table. With fixed rows, typed columns, live totals, server-side checks and totals you can calculate with, a timesheet, an order sheet or a room survey becomes one tidy field instead of forty loose ones, and every entry arrives in the same clean shape. Ready to build your first grid? Get Gravity Forms Matrix Grid.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr