I'm not sure how I'd go about doing this or if it even is possible. I'd like to make a drop down (or checkmark button) where you can select Active, Inactive, Shutdown. And when choosing one it puts a green, yellow, or red circle beside a text?
top of page
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
bottom of page
Great! I intentionally provided a basic guideline instead of giving a complete code solution.
Play around, try it out, and I'm sure you'll get this working in no time ;-)
Hey there,
Thank you for your response Ziv! I'll see if I can find a way to do to as I know no Javascript. I will look at the API documentation and see if I can find anything! :D
Can be done, with a bit of JS code.
All you need to do is:
- create three circle components, give them the right color, set them all to "hidden on load" and place them one on top of the other at the location where you want them to appear
- listen to the onChange() event of your dropdown component.
whenever the selected value changes, use the hide() and show() APIs of the circle components to show the matching one.
You can read about the different APIs in our API reference page.
Give it a try and let us know if you managed to make it work.
Good luck!