Created
August 17, 2012 14:28
-
-
Save hansspiess/3379145 to your computer and use it in GitHub Desktop.
Wordpress: Add custom Class to Contact Form 7 <form> tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'wpcf7_form_class_attr', 'custom_custom_form_class_attr' ); | |
function custom_custom_form_class_attr( $class ) { | |
$class .= ' nice'; | |
return $class; | |
} | |
?> |
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 !
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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"]