I am trying to add text to the blank selection at the top of the drop down. When selected, the associated repeating group shows all counties as wanted but I would like to name it “All Counties”
I tried the Custom Blank Options for Dropdowns plugin without success. I currently have the following java script workflow running but still no success.
Hi, Thanks for the response. There’s some progress but the selection is blank when I first navigate to the page. If I navigate away and then return, the drop down displays All Counties at the top which is what I want. Any idea why it isn’t there when the page first loads? Debugger says the js is running.
Unless you are dynamically rendering the dropdown (such as dropdowns in repeating groups), all you need to do is run the script once after the dropdown has rendered.
For example if it is visible on page load, just run it after the page loads above fold or entirely.
You can use a Do When Event that runs the script when that dropdown is visible. Add a small delay (pause action) if it still doesn’t find the element.
It’s just how running browser scripts work. It needs to be able to find the element during execution. You can of course use an observer but kinda overkill if it’s just one element.