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

How to Upload a CSV or Excel File Into a Gravity Forms List Field

GravityExtra
How to Upload a CSV or Excel File Into a Gravity Forms List Field

A school sends a form to the parents of a team. A company asks a customer to list twenty attendees for a workshop. A shop takes a bulk order with sixty lines. In every one of these cases the person filling in the form already has the data in a spreadsheet, and the form offers a List field with one row at a time and a small plus button. Typing sixty rows by hand is slow, and the mistakes that come with it are the ones you pay for later.

This tutorial shows how to let visitors upload a CSV or Excel file into a Gravity Forms List field, so that the rows fill the list in a moment, are checked before the form is sent, and are checked again on your server.

Why the List field alone is not enough

The Gravity Forms List field is a good way to collect a table: you choose the columns, the visitor adds rows. It does not know about files. There is no paste of a whole table, no import, and no way to say that a column must be an email address or a number between one and fifty. For a roster of ten people that is fine. For fifty it is a reason for visitors to leave the form, or to send the spreadsheet by email, which brings you back to copying data by hand.

A File Upload field is not the answer either. It stores the file in your uploads folder and leaves you to open it, read it and type it into your own system. What you want is the data, in the form, in the entry, in the same shape as every other answer.

What the add-on does

The Gravity Forms List Upload Premium Add-on adds an upload button under a List field. The visitor chooses a CSV or Excel file, the add-on reads it in the browser, and a panel opens where the columns of the file are matched to the columns of the list. After a preview, one button fills the list. The visitor can still change any cell before sending the form.

The List Upload panel with the file columns matched to the list columns, a preview of the first rows and the button Fill the list
Match the columns, check the preview, then fill the list.

The file never travels to your site. It is opened by the visitor’s own browser and only the rows that end up in the list are sent, with the rest of the form. That is good for privacy, since you do not collect a file you never asked for, and good for security, since there is nothing uploaded to examine.

Step 1: turn it on for a List field

Open the form in the form editor and select the List field. In the General tab you will find the List Upload section. Tick Let visitors fill this list from a CSV or Excel file. Everything else has a sensible default, so for a first try you can stop here.

The List Upload settings of a List field in the form editor: file types, limits, column rules and the apostrophe protection
The settings of a List field: file types, limits, rules and protection.

Choose which file types you accept. CSV works in every browser and every spreadsheet program can save it. Excel files, with the .xlsx ending, are more convenient for visitors, since they do not need to know about saving as CSV. The default accepts both.

Step 2: set limits that match the form

Three limits keep the form calm. Most rows is the number of rows a visitor may add, 200 by default and 2000 at most. File size is the largest file the browser will open, 2 MB by default and 5 MB at most. Cell length is the longest text a single cell may have. A roster of a few dozen names is a file of a few kilobytes, so you can lower these numbers and be stricter than the defaults.

Step 3: write rules for the columns

This is where the add-on saves the most time. For each column you can write rules in one line: the column title, a colon, and the rules separated by semicolons.

Email: required; email
Qty: integer; min=1; max=50
Start: date
Size: in=Small,Medium,Large

A visitor who uploads a file with an address that is not an address sees the row number and the problem in the panel before anything is added. Rows with problems are left out and listed, or, if you prefer, nothing is added until the file is fixed. In both cases the rules are checked again on the server when the form is sent, so they also apply to rows that were typed, and nobody can get around them by changing the page.

How the columns are matched

A file from a customer rarely has the columns in the order you hoped for. The add-on looks at the first row and, when it holds the titles of your list columns, uses them to match the columns whatever their order. When the first row is text and the rows below it hold numbers, it also takes it for a header. When nothing matches, the columns are matched by position. In every case the panel shows the choice, and the visitor can change any of them with a drop down or leave a column empty.

Excel files, dates and formulas

A workbook is read for the values saved in its cells. Dates become plain text such as 2026-12-31, so they pass a date rule and read the same in every entry. Formulas are not run: the value Excel last saved is used, so a total that Excel calculated arrives as the number you saw. A workbook with several sheets shows a list, and hidden sheets are not offered. The old .xls format and files with macros are refused with a message that tells the visitor to save the sheet as .xlsx or .csv.

Is reading a visitor’s file safe?

It is a fair question. A spreadsheet file from a stranger is a place for old tricks. A workbook is a ZIP package of XML files, and two classic attacks are a small ZIP that unpacks to gigabytes and an XML file that declares entities that expand into more entities. The reader guards against both. Every part is stopped when it grows past a limit while it is being unpacked, whatever the file claims about itself. A workbook that declares a document type or entities is refused before its XML is parsed. Macros are refused, formulas never run, and everything from the file is put in the page as plain text, so a cell that contains markup is only shown, never run.

There is one more risk that comes later. If a cell starts with an equals sign, someone who opens an export of your entries in a spreadsheet program may run a formula they did not write. By default the add-on puts an apostrophe in front of such cells when the entry is saved. Numbers such as -5 and phone numbers are left as they are.

What happens on the server

When the form is sent, the server counts the rows, measures every cell and applies every rule. If something is wrong, the visitor gets an error on the List field in the usual Gravity Forms way, with the row, the column and the problem, and the entry is not saved. The same goes for forms with several pages and forms sent with AJAX. When the rows are good, they are saved as an ordinary List field value, so notifications, merge tags, calculations and exports work as they always did.

A short example: a workshop booking

A training company lets a customer book places for a workshop. The form asks for the company and for a list of attendees with the columns Name, Email and Diet. The List Upload section is on, the most rows is 40, and the rules are Email: required; email and Diet: in=None,Vegetarian,Vegan,Halal,Kosher. The customer exports the attendee list from their own system, uploads it, sees that two rows have a typing error in the email address, fixes them in the file and uploads again. The form is sent with thirty-one rows and the confirmation email lists every attendee, without a single row typed by hand.

Tips

  • Give the visitor a template: a small CSV with your column titles in the first row. Names that match mean no manual matching.
  • Keep the limits tight. A form that expects twenty rows should say twenty.
  • Use in= for any column that is a drop down in your List field, so a value that is not a choice is caught in the panel.
  • Leave Protect exports on unless you have a reason.
  • Test with a bad file: an empty line, a missing column, a date in the wrong format. The messages are the visitor’s guide, so read them as the visitor would.

Frequently asked questions

Can visitors drag the file onto the form?

Yes. The upload area accepts a dragged file, and the button opens the usual file chooser, including on phones.

Does it keep the file?

No. It is read in the browser and forgotten. Only the rows in the list are sent with the form.

Which Excel files work?

Files that end in .xlsx. The old .xls format, macro workbooks and password protected workbooks are refused with a clear message.

What if the CSV uses semicolons?

That is detected. Commas, semicolons, tabs and vertical bars are all understood, and so are quoted cells and cells with line breaks.

Which Gravity Forms versions does it support?

Gravity Forms 2.9 and newer. It is tested with Gravity Forms 3.1.2 on PHP 8.3 and Gravity Forms 2.9.8 on PHP 7.4.

Get started

The Gravity Forms List Upload Premium Add-on turns a List field into a form that accepts a spreadsheet, with a column matching panel, rules for every column and a second check on your server. See the features, the price and the setup guide on the add-on page.

See the List Upload add-on

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