background preloader

Contact Forms

Facebook Twitter

How to Style Contact Form 7 Form Like ElegantThemes Contact Form. If you are customer of ElegantThemes, you probably already know that it comes with a powerful contact form page template with built-in validation check. You can use this page template to create a contact form instantly. Although the default ElegantThemes contact form page template comes with a lot of custom options, it lacks some features. For example, you have to manually edit the code to remove captcha from it.

Its also difficult to add additional fields to it. A good alternative to default ElegantThemes Contact Form is the contact form 7 WordPress plugin. The only problem with contact form 7 plugin is that it doesn’t look like the ElegantThemes Contact Form and thus, doesn’t blend in nicely with WordPress themes from ElegantThemes. If you want to use contact form 7 plugin, and still don’t want to miss the nice look of default contact form ElegantThemes, then just paste the following code at the end of style.css file of your theme from ElegantThemes, Now clear your browser’s cache once.

Insert Shortcodes into a Theme. What are Shortcodes? Shortcodes, which many plugins take advantage of, are an easy and quick way to insert special kinds of content into your posts or pages. A shortcode typically looks something like this one from a plugin that is supposed to display the number of categories on a site: [catcount] You just pop your shortcode into your post, and then behind the scenes everything gets called into the post in the way it should.

So in the case above, I might write a post that says the following: The total number of categories is [catcount]. If I have 21 categories, then when the post is published it will read: The total number of categories is 21. If I add a category, then that number will automatically get bumped up to 22. Featured Plugin - WordPress Google Maps Plugin Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget. Find out more Inserting a Shortcode into a Theme. Style the Contact Form 7 Wordpress Plugin - EricJHansel.com. CF7: complete theme. Contact Form 7 is a super flexible form generator that we use on nearly every site but the default styling is non existant. Here is some css to override the default styling. Working Demo To style your form you need to add this css code to your main site CSS file and upload the images to your images folder inside your theme.

How about autofocus? jQuery('.wpcf7-text:first').focus(); You may also want to change the loading gif. Add this to your functions.php and create your own colour coded loading gifs here ajaxload.info or preloaders.net /* Custom ajax loader */ add_filter('wpcf7_ajax_loader', 'my_wpcf7_ajax_loader'); function my_wpcf7_ajax_loader () { return get_bloginfo('stylesheet_directory') . CF7: Style the submit button. Optimize and style Contact Form 7. One of my favorite WordPress plugins is Contact Form 7 which I use on several of my WordPress based sites. Even though it’s highly customizable and configurable I have a few gripes with some hard coded functions in it. You can always edit the plugin file, which I did at first, but then you have to reapply your edits every time the plugin gets updated, which can be cumbersome as this plugin gets updated quite often.

So instead of keep editing the plugin file on every update I created some overrides instead. The Issues The url to the AJAX loader symbol is hardcoded into the plugin, so if you don’t use a white background in your theme the loading symbol looks quite ugly. The Solutions So to not have to edit the plugin file, I added a few overrides in my theme’s functions.php file instead to change the behaviour of the plugin where needed. Let’s start by taking care of the AJAX loading symbol. Okay, now let’s see take care of the script loading on each page of the site. The Final Code. Additional options of CF7. Contact Form 7 1.10 is now available. New features in this version include additional mail headers, response message placeholder tags [response], the calling of user-specified JavaScript code when a message is sent successfully, controlling JavaScript loading with new constant, and much more.

Therefore, I would highly recommend that you upgrade today! Download | Plugin Homepage | FAQ | Support Forum(日本語のドキュメントは下のほうにあります。) Additional Mail Header In the past, Contact Form 7 allowed you to set mail headers of To, From and Subject. Have you ever thought of adding Cc or Bcc headers to your mail? You can input any header lines into the field; and you can insert any tags into any place in each header line, just like other Mail fields. [response] Tag After a reader of your blog submits the contact form, he or she sees a response message from Contact Form 7, such as “Your message was sent successfully” or “Validation errors occurred.” A tag [response] for the placeholder has been introduced. その他の変更. Using Jetpack for Email Subscriptions in WordPress. You can find a bunch of “subscribe to posts” plugins in the WordPress.org directory but from my personal experience, it’s very difficult to find something as good and reliable as Jetpack.

The major difference is behind the scenes — when most post subscription plugins will use the wp_mail function to distribute your new post (using sendmail from your server or an SMTP account,) Jetpack will simply send your new post to the WordPress.com server, which will take care of the distribution for you. Why does that matter? I can name several reasons: The WordPress.com mail servers can handle far more load than your shared hosting server, VPS or dedicated server, so e-mails will (most likely) be delivered on time and to everyone.People enjoy reading posts from one place. However, there are drawbacks too, the major one of which, is that you don’t have control over the actual markup in the e-mail that’s being sent, so no advertising, changing colors and so on.

The Subscription Form <? What’s next?