Change color of placeholder text in a dropdown field.

By: Víctor Galindo | Asked: 08/30/2022
ForumsCategory: Code HelpChange color of placeholder text in a dropdown field.
Víctor Galindo asked 2 years ago
Hello everyone. Is there a way to change the color of the placeholder text in a dropdown field. I would be enormously grateful. Thank you very much. Sorry for my English, I'm using the google translator.
Attachments
2 Answers
Victor Font answered 2 years ago
See this: https://www.w3schools.com/howto/howto_css_placeholder.asp
Víctor Galindo answered 2 years ago
Thank you very much for your answer. Unfortunately this doesn't work with Formidable's dropdown fields.   I opened a support ticket and this was the response:   ————————   Unfortunately that isn't as easy as it sounds to style a dropdown for only a specific value. The select uses the "color" CSS attribute for the text color and unless we started toggling on and off a class that indicated the select was in a "placeholder" state or not there really isn't an easy way to distinguish the placeholder from another selectedoption.   You could probably achieve a specific use case with some custom JavaScript but I'm concerned any custom code for this would end up missing some edge case.   —————————   However, I saw that in another form builder (Forminator) they did give a solution to a user, but I don't know how to implement it in Formidable:   https://wordpress.org/support/topic/change-placeholder-for-dropdown/

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right