-
-
Save hansspiess/3379145 to your computer and use it in GitHub Desktop.
<?php | |
add_filter( 'wpcf7_form_class_attr', 'custom_custom_form_class_attr' ); | |
function custom_custom_form_class_attr( $class ) { | |
$class .= ' nice'; | |
return $class; | |
} | |
?> |
I am also interested in knowing some way to add a class to only a specific form, when there are multiple forms created.
Please check this link: http://contactform7.com/faq/can-i-add-id-and-class-attributes-to-a-form-element/
This will give you overall information what you want.
Form specific:
[contact-form-7 id="1234" title="Contact form 1" html_id="contact-form-1234" html_class="form contact-form"]
Field specific:
[text* first-name class:full class:field placeholder "FIRST NAME"]
Add class to submit button,
[submit class:btn class:btn-primary "Send"]
Please check this link: http://contactform7.com/faq/can-i-add-id-and-class-attributes-to-a-form-element/
This will give you overall information what you want.Form specific:
[contact-form-7 id="1234" title="Contact form 1" html_id="contact-form-1234" html_class="form contact-form"]
Field specific:
[text* first-name class:full class:field placeholder "FIRST NAME"]
Ty ! it works for me !
if i have more than 2 forms ? how to target it