I've kept using Contact Form 7 strictly because it works and I haven't had the need for more advanced options regarding contact forms or any other forms. What's so bad about Contact form 7?
I've kept using Contact Form 7 strictly because it works and I haven't had the need for more advanced options regarding contact forms or any other forms. What's so bad about Contact form 7?
I don't think anyone said there's anything bad about it per se. I use it regularly.
However it loads a bunch of javascript and CSS onto pages which I often don't want. There's no point in loading jQuery, plus another JS and extra CSS file on all pages of a site when they're only used on a single page. It's just slowing the rest of the site down. It's best to put the CSS into the themes stylesheet and either only load the JS on the page you want it, or not load it at all and stick with a regular old HTML form.
I wasn't aware that Contact Form 7 came with a CSS file. Hmm, It should just blend in with the surrounding design elements. Hmm.
Yep, it's in your source code <link rel='stylesheet' id='contact-form-7-css' href='http://www.wptavern.com/wp-content/plugins/contact-form-7/styles.css?ver=2.2' type='text/css' media='all' />
I eventually turned this into a plugin:
http://pixopoint.com/products/deregi...form-7-plugin/
I needed to trim out the code for a clients site so took the opportunity to "pluginify" it while I was at it in case others find it useful. I've submitted it to the plugin repo. so it'll hopefully be available there within the next week too.
It's pretty basic, it literally just rips out the scripts and styles across all pages. If anyone feels like improving on it, perhaps by only removing them for the pages on which there are no contact forms, then feel free to fork it.
I do like Contact Form 7 but did have some similar issues a while back due to multiple jQuery library loading etc. All I did was to edit the 'Contact Form 7' plugin file: contact-form-7/wp-contact-form-7.php. Simply go to your WordPress dashboard and select the Plugins -> Editor menu option. The file you need to edit should be loaded by default. Search for the lines of code below:
and change true to false, as follows:Code:if ( ! defined( 'WPCF7_LOAD_JS' ) ) define( 'WPCF7_LOAD_JS', true );
Worked fine for me..Code:if ( ! defined( 'WPCF7_LOAD_JS' ) ) define( 'WPCF7_LOAD_JS', false );
WP TurnKey - Turn-Key WordPress installation and maintenance services
WordPress user since 2005 | @chip_bennett | chipbennett.net | cbnet Plugins
Not a plugin but a nice example of adding all the code for a contact form inside a theme template page. Nice and compact way of doing it that doesn't require your users to install a plugin, on top of the theme install.
http://www.catswhocode.com/blog/how-...ordpress-theme