# Chained Select big CSV

**URL:** <https://community.gravityforms.com/t/chained-select-big-csv/1116>\
**Category:** Get Help\
**Tags:** chained-selects\
**Created:** [February 21, 2019, 12:36am UTC](https://community.gravityforms.com/t/chained-select-big-csv/1116 "2019-02-21T00:36:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![user5c6df038203935.3](https://avatars.discourse-cdn.com/v4/letter/u/bcef8e/32.png) [@user5c6df038203935.3](https://community.gravityforms.com/u/user5c6df038203935.3)\
**Post date:** [February 21, 2019, 12:36am UTC](https://community.gravityforms.com/t/chained-select-big-csv/1116/1 "2019-02-21T00:36:53Z")

</div>

Hi,

When I upload the small size CSV file(22kb) in the Chained Select. The update option work and form update but when I upload the small size CSV file(228kb) in the Chained Select. Then the update option doesn’t work and form update.

Thanks

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [February 21, 2019, 4:30am UTC](https://community.gravityforms.com/t/chained-select-big-csv/1116/2 "2019-02-21T04:30:28Z")

</div>

Please see if you are running into either of these limitations:

> **[Creating Chained Selects with the Chained Selects Add-On](https://docs.gravityforms.com/creating-chained-selects/#limitations)**
>
> When creating chained selects in Gravity Forms, you will need to create a CSV file that will hold all of your available options. In this article, we will show you how to easily create a chained select field using the Chained Selects Add-On.

---

<div class="post-metadata">

**Author:** ![user5c6df038203935.3](https://avatars.discourse-cdn.com/v4/letter/u/bcef8e/32.png) [@user5c6df038203935.3](https://community.gravityforms.com/u/user5c6df038203935.3)\
**Post date:** [February 21, 2019, 7:47am UTC](https://community.gravityforms.com/t/chained-select-big-csv/1116/3 "2019-02-21T07:47:51Z")

</div>

Sir thanks for reply.

### Limitations

By default the CSV file being uploaded is limited to 5000 unique values allowed for each column and 1mb of file size. If you require going beyond these limits your can alter them [using gform\_chainedselects\_column\_unique\_values\_limit](https://docs.gravityforms.com/gform_chainedselects_column_unique_values_limit/) and [gform\_chainedselects\_max\_file\_size](https://docs.gravityforms.com/gform_chainedselects_max_file_size/) respectively.

How to increase the limit for the big CVS file?

When you’ll upload the big CVS file. Then you’ll click on the update button. The error will show on browser.

404 Page Not Found

Thanks

---

<div class="post-metadata">

**Author:** ![hiranthi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/hiranthi/32/359_2.png) [@hiranthi](https://community.gravityforms.com/u/hiranthi)\
**Post date:** [February 22, 2019, 8:40pm UTC](https://community.gravityforms.com/t/chained-select-big-csv/1116/4 "2019-02-22T20:40:39Z")

</div>

In the docs linked in the ‘Limitations’ you copy/pasted there are example code-blocks that can help you get the results you want.

If you’re not getting the needed results: could you please elaborate on what you’ve tried, what you expected it to do and what results you got instead? Thanks.

---

<div class="post-metadata">

**Author:** ![user5c6df038203935.3](https://avatars.discourse-cdn.com/v4/letter/u/bcef8e/32.png) [@user5c6df038203935.3](https://community.gravityforms.com/u/user5c6df038203935.3)\
**Post date:** [February 22, 2019, 10:17pm UTC](https://community.gravityforms.com/t/chained-select-big-csv/1116/5 "2019-02-22T22:17:55Z")

</div>

I pasted the code-blocks on the functions.php file. Then, I uploaded the CVS file on the chainedselects but the error is displaying.

**Error Message**

There was an error processing this file.  
**Error: 422** , Message: One of your columns has exceeded the limit for unique values.

Then, I changed this code

`add_filter(` `'gform_chainedselects_column_unique_values_limit'` `,` `'set_limit'` `);`  
`function` `set_limit(` `$limit` `) {`  
`` `return` `100;`  
`}`

**To**

add\_filter( ‘gform\_chainedselects\_column\_unique\_values\_limit’, ‘set\_limit’ );  
function set\_limit( $limit) {  
return 5000;  
}

The error removed by the changed new code and Now the new error is displaying after to update form.

**Error:**

There was an error while saving your form. Please [contact our support team]

---

<div class="post-metadata">

**Author:** ![hiranthi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/hiranthi/32/359_2.png) [@hiranthi](https://community.gravityforms.com/u/hiranthi)\
**Post date:** [February 22, 2019, 10:33pm UTC](https://community.gravityforms.com/t/chained-select-big-csv/1116/6 "2019-02-22T22:33:18Z")

</div>

Did you change the [gform\_chainedselects\_max\_file\_size](https://docs.gravityforms.com/gform_chainedselects_max_file_size/) too?

Don’t forget about the [max\_upload\_filesize](https://stackoverflow.com/questions/2992376/how-to-set-upload-max-filesize-in-htaccess) btw. If the file you’re trying to upload is larger than your hostingprovider has set as default, uploading larger files will result in errors.

---

<div class="post-metadata">

**Author:** ![user5c6df038203935.3](https://avatars.discourse-cdn.com/v4/letter/u/bcef8e/32.png) [@user5c6df038203935.3](https://community.gravityforms.com/u/user5c6df038203935.3)\
**Post date:** [February 22, 2019, 11:25pm UTC](https://community.gravityforms.com/t/chained-select-big-csv/1116/7 "2019-02-22T23:25:45Z")

</div>

Yes! I pasted the code for max file size.

`add_filter(` `'gform_chainedselects_max_file_size'` `,` `'set_size'` `);`  
`function` `set_size(` `$size` `) {`  
`` `return` `2000000;` `//2mb`  
`}`

Now I’ve changed the max upload file size( php\_value upload\_max\_filesize **30M and 512M** ) according to your requirements.

The error is still displaying after to update form.

**Error:**

There was an error while saving your form. Please [contact our support team]

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/david/32/2517_2.png) [@david](https://community.gravityforms.com/u/david)\
**Post date:** [March 1, 2019, 1:43am UTC](https://community.gravityforms.com/t/chained-select-big-csv/1116/8 "2019-03-01T01:43:35Z")

</div>

You’re probably running into a [$\_POST size limit](https://stackoverflow.com/questions/2364840/what-is-the-size-limit-of-a-post-request) since all of that data is being loaded into the form.

You will have much better results if you create a new table in your WordPress installation, import your CSV there, and then use the [gform\_chained\_selects\_input\_choices](https://docs.gravityforms.com/gform_chained_selects_input_choices/) filter to query your custom table and fetch the desired rows.

---

<div class="post-metadata">

**Author:** ![richardw8k](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/richardw8k/32/2354_2.png) [@richardw8k](https://community.gravityforms.com/u/richardw8k)\
**Post date:** [January 4, 2022, 5:33pm UTC](https://community.gravityforms.com/t/chained-select-big-csv/1116/9 "2022-01-04T17:33:03Z")

</div>


