In the WordPress plugin, Contact Form 7, you can select to insert a blank line as the first option when you create a dropdown field.
In many instances, this is better than having the first option be the first choice, unless you want to default to a particular country but what if you want the first line to say something specific?
The blank line in the drop down field looks like the following by default.
Contact Form 7 Dropdown Box example
The three dashes aren’t really that useful.
If you want to change this text, you can the following to your functions file, which is usually available at Appearance > Editor > functions.php. Make a back-up of the file first because it is very easy to temporarily break your site if there is an error in this file.
function my_wpcf7_dropdown_form($html) { $text = 'Please select...'; $html = str_replace('', '', $html); return $html; } add_filter('wpcf7_form_elements', 'my_wpcf7_dropdown_form');
You can change the text ‘Please select …’ to anything that you want but make sure you keep the single quotes around it.
After you add the function, your dropdown will look like the following. The Please select text makes the dropdown more user friendly than the three dashes.
If you would like assistance customizing Contact Form 7 or other parts of your site, please contact me.
photo credit: eduardozarate