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
function my_wpcf7_form_elements($html) {
$text = 'Please select...';
$html = str_replace('<option value="">---</option>', '<option value="">' . $text . '</option>', $html);
return $html;
}
add_filter('wpcf7_form_elements', 'my_wpcf7_form_elements');
this code, replacing with targeting
function my_wpcf7_form_elements($html) {
function ov3rfly_replace_include_blank($name, $text, &$html) {
$matches = false;
preg_match('/<select name="' . $name . '"[^>]*>(.*)<\/select>/iU', $html, $matches);
if ($matches) {
$select = str_replace('<option value="">---</option>', '<option value="">' . $text . '</option>', $matches[0]);
$html = preg_replace('/<select name="' . $name . '"[^>]*>(.*)<\/select>/iU', $select, $html);
}
}
ov3rfly_replace_include_blank('menu-569', 'Choose language', $html);
ov3rfly_replace_include_blank('menu-614', 'Choose country', $html);
return $html;
}
add_filter('wpcf7_form_elements', 'my_wpcf7_form_elements');
hope that will save for some of you a headache
(source here)