im searching for a way to put a watermark on select fields.
that is not working ->
[select* c_type class:ic watermark "choose type" "a" "b" "c"]
to put a not valid value that fail validation, i had to put include_blank
[select* c_type class:ic include_blank "a" "b" "c"]
but the problem is that i have ---
as watermark, thats what i want to change..
More recent versions of Contact Form 7 allow the use of first_as_label to create placeholder text that does not validate as an entry if users do not make a selection. Simply make your placeholder text be the first label in the list of options.
After hard searching i found this script that is working and replacing the “—” when targeting to that element
this one is changing all the “—“s
this code, replacing with targeting
hope that will save for some of you a headache
(source here)
Try this:
You can do it with one line of jQuery.
The blog post for this solution with screenshots is Here
If you find string replacement unefficient, you could simply use this:
I also made sure that the first alternative is the “label” i want to use, by adding ‘first_as_label’ to the shortcode in wcf7, like this:
By making the first option disabled, wcf7 won’t confirm the form until this an enabled alternative is chosen.