High DOM Size | Gravity Forms "Country" Field

Good Day,

When using the Address element of Gravity Forms, the Country field is impacting the DOM size of our affected GF pages. See below for details.

The above occurs on both desktop and mobile devices.

Fix (or comments) appreciated :slight_smile:

Thank you,


free image hosting


This is a general issue that impacts all Gravity Forms customers using the Address element.

Cheers :slight_smile:

You may follow this article:

:point_right: Quick Tips:
Set display none for a country list and add jQuery event listener so when you click on the dropdown, it’ll be a display block.

.countries-list {
  display: none;

Here is the jQuery code you may try:

$(document).ready(function() {
  $('#countryDropdown').on('click', function() {

Hey @faisalahammad,

Thank you so much for the information, insight, and proposed solution.

We’ll give that a spin and report back here our results. Stay tuned :slight_smile:

Again, thank you.


Hey @faisalahammad,

Unfortunately, your proposed solution did not work for us. Are you using it on one of your Gravity Forms pages?

Let’s see if we can mitigate the issue by lazy loading the dropdown contents. Stay tuned.

Again, thank you.



We learned it’s not possible to lazy load the dropdown contents (i.e., country list) to mitigate this issue.

As it turns out, the country list is rendered directly in the DOM output (not via a separate JS file).

So, we’re back to square one. Hoping that GF developers will review this topic and provide additional help.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.