How can I add a class to my form. I´m using a framework that have some especial classes for forms but must to be with a class in form tag. It´s possible ?
Thanx :)
How can I add a class to my form. I´m using a framework that have some especial classes for forms but must to be with a class in form tag. It´s possible ?
Thanx :)
wpcf7_form_class_attr filter is available. Add this code to your theme's functions.php.
add_filter( 'wpcf7_form_class_attr', 'your_custom_form_class_attr' );
function your_custom_form_class_attr( $class ) {
$class .= ' foo bar';
return $class;
}Takayuki Thanx, it works :)
But what about if I need also to add a class to the button?
For each field in a form, you can add 'class:' option in the tag.
Example:
[text* your-name 20/40 class:required "John Smith"]
See docs.
Text Fields
what code do I add to this to move the box to the right?
`[select your-country class:class-name1 "Australia" "Brazil" "Canada" "Denmark" "Finland"]
Thanks
.class-name1 {
float:right;
}You must log in to post.