联系表格7班级/ ID

时间:2018-01-11 08:30:25

标签: wordpress forms contact-form-7

您好我正在使用wordpress创建一个网站。我正在使用多种联系表格。
我选择使用联系表格7并制作了几种形式,但问题在于造型。
当我用

定位联系表格时
.wpcf7-form {
    height:600px;
    padding-left:20%;
    width:100%;
    background: linear-gradient(to right, rgba(250, 118, 34, 1) , rgba(243, 49, 27, 1) );
}

当然它针对每一种形式,但我的问题是我可以给它一个班级或ID吗?因为我无法在wordpress中找到它。

1 个答案:

答案 0 :(得分:1)

You can apply class and id both as per your requirement in form tag of contact form 7.

You might have already put the short code of contact form 7. Right? There are two parameters to set form id and form class to contact form 7 element.

These parameters are: html_id and html_class. Example:

[contact-form-7 id="your_auto_genarated_id" title="Contact form 1" html_id="contact-form-1234" html_class="form contact-form"]

For complete guide see: https://contactform7.com/faq/can-i-add-id-and-class-attributes-to-a-form-element/