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…
<option></option>
…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!