How to add custom class in contact form 7’s form tag?
Contact form 7 is very famous form plugin for wordpress. It allows us to manage and customize multiple forms with simple markup.
We can build forms with bootstrap html structure and classes. For bootstrap classes we also need to add class in form tag so we can do this by adding following function in our theme’s functions.php file.
add_filter( 'wpcf7_form_class_attr', 'add_form_class' ); function add_form_class( $class ) { $class .= ' form-horizontal'; return $class; }