cf_twoSelectsRelated – fix for preselect issue

I was hard pressed to find a fix for the issue that occurs in this ColdFusion Custom Tag cf_twoSelectsRelated originally by Nate Weiss. When you use the emptyText1 and emptyText2 attributes together and want to preselect values the second box wont fill out the values required. I knocked up a bit of javascript you can […]

I was hard pressed to find a fix for the issue that occurs in this ColdFusion Custom Tag cf_twoSelectsRelated originally by Nate Weiss. When you use the emptyText1 and emptyText2 attributes together and want to preselect values the second box wont fill out the values required. I knocked up a bit of javascript you can put in the bottom of your custom tag that will fix this issue – and preselect the values in both boxed if they are selected.

I have posted the completed file at the bottom of this post in a zip file – use the download link.

Duncan Isaksen-Loxton

Educated as a web developer, with over 20 years of internet based work and experience, Duncan is a Google Workspace Certified Collaboration Engineer and a WordPress expert.
Login
Log in below to access your courses.
Log In With Google
Forgot Password
Enter your email address or username and we’ll send you instructions to reset your password.