Prevent filter from automatically filtering on page load when using a Custom Form Select dropdown as the only filter

Hi there.

I’m using the Custom Form Select to generate a list of states. When the user chooses a state, I am showing a filtered list of contacts for that state. That works great. However, I want the initial state to be unselected. From what I can tell, the Select is auto-selected on page load, which submits the query. I’m looking for a way to prevent this.

The first option in my Select is “Choose a state” with no value attribute. When the page loads, this is the option that is automatically chosen, which triggers the Filter module on page load.

How can I prevent this?

I have enabled the Show Query option, which allows you to see that the query for “Choose a state” option is added on page load.

Here is a read-only link to my project.

One solution I’ve come across is to leave the first Option blank…


…but then the label for the custom dropdown that mirrors the Select is also blank.

Additionally, it appears that the Initial State feature will not work in this scenario either.

Would love any assistance or insight you can provide!

I think I was able to get this to work by using CMS Select as well. I was originally building a Select using a custom element.

Hey, @jon.thomas! I also think you got it working as it should!

I don’t see the Choose+a+state parameter any more on page load :muscle: