If your are receiving the email on Outlook in Times New Roman, add the following code inside the head tag.
Views: 57
If your are receiving the email on Outlook in Times New Roman, add the following code inside the head tag.
Views: 57
---'
in all forms with the same text:For replacing all ‘—‘ blank value of select , add the below filter in function.php
function kd_wpcf7_form_elements($html) { $text = 'Select'; $html = str_replace('<option value="">---</option>', '<option value="">' . $text . '</option>', $html); return $html; } add_filter('wpcf7_form_elements', 'kd_wpcf7_form_elements');
We can replace the $text variable with any text.
2. Replace the select element blank value with unique text.
For replacing the select elements blank with unique text add the following filter in function.php
function kd_wpcf7_form_elements($html) { function kd_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); } } kd_replace_include_blank('subject', 'Subject', $html); kd_replace_include_blank('country', 'Country', $html); return $html; } add_filter('wpcf7_form_elements', 'kd_wpcf7_form_elements');
Views: 1029