Placeholder in Contactform 7 - Wordpress

。_饼干妹妹 提交于 2019-12-07 05:32:17

问题


I am making a website for a client of me but im running into a problem. I've made a contact form in wordpress using Contact Form 7. This plugin is really easy to use but when i wanted to use the placeholder property of the plugin it did not show the placeholder when i loaded the page.

This is how i set the placeholder in Contactform 7

[text* your-name placeholder "Name"]

The placeholder tag works just fine for my textarea but it doesnt work with the textbox above. Can someone explain to me what i am doeing wrong here?

EDIT

When i inspect the element with Google Chrome and inspect the textbox it says that it has a placeholder. But it doesnt show the placeholder.


回答1:


If anyone is having trouble with this, it could be that you're using class: or id: attributes.

It worked for me when I added placeholder after all those:

[email* your-email id:your-email class:form-control placeholder "ex. Jon.Smith@email.com"]



回答2:


Same problem, then I change the input background color and the placeholder text is white on background white ...

So I sudgest to try to change the backrgound input color to test:

input[type="text"], textarea {
  background-color : #d1d1d1; 
}



回答3:


Its very simple.You can add placeholder like this:

[text* first_name placeholder"First Name"] 

Documentation : https://contactform7.com/setting-placeholder-text/




回答4:


[text* your-name placeholder "Name"] The syntax was what you gave correct once check the contact form settings. Because I am also using same as like your syntax it was working properly in my contact form.




回答5:


If you are using class or id attributes.Simply do the following:

[text* your-name class:form-control id:name placeholder "Enter Name"]


来源:https://stackoverflow.com/questions/24309750/placeholder-in-contactform-7-wordpress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!