Contact form 7 default option print as selected value in mail Contact form 7 default option print as selected value in mail wordpress wordpress

Contact form 7 default option print as selected value in mail


[select my_select first_as_label class:styled "Select Options" "Option 1" "Option 2" "Option 3" "Option 4"]

Also, you can check the documentation.


Change your select tag to the following

[select my_select class:input class:styled include_blank "Option 1" "Option 2" "Option 3" "Option 4"]

The first option will have "---" as the text and a blank value, <option value="">---</option>

If you want to replace the text "---" with "Select Options" add the following code to functions.php

function my_wpcf7_form_elements($html) {    $text = 'Select Option';    $html = str_replace('---',  $text , $html);    return $html;}add_filter('wpcf7_form_elements', 'my_wpcf7_form_elements');


[select* BurjBestCompany default:get "The Best Advertising & Marketing Company" "The Best Airlines Company" ]

BurjBestCompany should match with the query string name

For example:

http://example.com/?BurjBestCompany=The+Best+Advertising+%26+Marketing+Company