Add CSS class to wrapping DIV tag produced by Contact Form 7
I’m using v3.3.1 of Contact Form 7.
I’d like to add a CSS class to the <div> which surrounds the HTML output by the plugin, so that instead of just the default HTML, I get something like this…
<div class="wpcf7 my-extra-css-class" id="…">
The reason for this is so that I can quickly attach form styling rules that I am using for other forms on the site which are not generated by Contact Form 7.
After reading through the documentation, I can’t seem to find a way to do this, except to hack the plugin code – specifically the form_html() function in contact-form-7/includes/classes.php.
Is there an option to do this?
- The topic ‘Add CSS class to wrapping DIV tag produced by Contact Form 7’ is closed to new replies.