Scott
Scott

Reputation: 57

Contact form 7 - Wordpress

I am creating a contact form using the 'Contact form 7' plugin. There is a facility to add placeholder text to all fields however you can't add this placeholder to a dropdown menu.

Does anyone have any ideas?

Maybe target the list with Javascript but add the disabled attribute to that value?

Thank you! Scott

Upvotes: 3

Views: 467

Answers (3)

charan kumar
charan kumar

Reputation: 2157

You can use first_as_label option of contact form 7 to make some text as placeholder, so that first option will convert as disabled option with placeholder text.

[select* Test first_as_label "Placeholder goes here" "Option 1" "Option 2"]

https://contactform7.com/checkboxes-radio-buttons-and-menus/

Upvotes: 1

Ajay
Ajay

Reputation: 1

I hope this would be helpful

<select>
    <option value="" disabled selected>Select Option</option>
    <option value="option1">option1</option>
    <option value="option2">option2</option>
</select>

Upvotes: 0

Lukas
Lukas

Reputation: 1123

It seems like there is no ways to add placeholders in dropdowns in CF7.

Maybe this can help.

Upvotes: 0

Related Questions