Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Contact Form 7

  1. #11
    Jeffro's Avatar
    Jeffro is offline WPTavern Forum Admin
    Join Date
    Jan 2009
    Location
    Ohio
    Posts
    2,358

    Default

    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?

  2. #12
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,797

    Default

    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.

  3. #13
    Jeffro's Avatar
    Jeffro is offline WPTavern Forum Admin
    Join Date
    Jan 2009
    Location
    Ohio
    Posts
    2,358

    Default

    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.

  4. #14
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,797

    Default

    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' />

  5. #15
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,797

    Default

    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.

  6. #16
    dgwyer's Avatar
    dgwyer is offline Tavern Regular
    Join Date
    Jun 2010
    Location
    London, UK
    Posts
    227

    Default

    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:

    Code:
    if ( ! defined( 'WPCF7_LOAD_JS' ) )
        define(  'WPCF7_LOAD_JS', true );
    and change true to false, as follows:

    Code:
    if  ( ! defined( 'WPCF7_LOAD_JS' ) )
        define( 'WPCF7_LOAD_JS', false  );
    Worked fine for me..

  7. #17
    chipbennett's Avatar
    chipbennett is offline WordPress Legend
    Join Date
    Feb 2009
    Location
    St. Louis, MO
    Posts
    1,993

    Default

    Quote Originally Posted by Ryan View Post
    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.
    My only suggestion would be a simple option page, to allow to define the pages that have contact forms. I suspect that, for most users, that will be only one page.
    WP TurnKey - Turn-Key WordPress installation and maintenance services
    WordPress user since 2005 | @chip_bennett | chipbennett.net | cbnet Plugins

  8. #18
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,797

    Default

    Quote Originally Posted by chipbennett View Post
    My only suggestion would be a simple option page, to allow to define the pages that have contact forms. I suspect that, for most users, that will be only one page.
    Yeah. If someone doesn't fork it then that would be on my todo list. Whether I actually get to that depends on if I find the need for that functionality myself. At this stage I don't.

  9. #19
    dgwyer's Avatar
    dgwyer is offline Tavern Regular
    Join Date
    Jun 2010
    Location
    London, UK
    Posts
    227

    Default

    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

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •