Simple Basic Contact Form is a clean, secure, plug-n-play contact form for WordPress. Minimal yet flexible, SBCF delivers clean code, solid performance, and ease of use. No frills, no gimmicks, just a straight-up contact form that’s easy to set up and style for any theme.
For a contact form with more options and features, check out Contact Coldform, or continue reading to learn more about Simple Basic Contact Form.
Overview
Here are some of my favorite features of Simple Basic Contact Form:
- Plug-n-play – use shortcode or template tag to display the form anywhere on your site
- Sweet emails – SBCF sends descriptive, well-formatted email messages in plain-text
- Safe and secure – Simple Basic Contact Form blocks spam and filters malicious content
- Ultra-clean code – SBCF is lightweight, standards-compliant, semantic, valid markup
- Fully customizable – SBCF is easy to configure and style from the Settings page
Here is a screenshot showing the form displayed on WP’s default Twenty Eleven theme:
![[ WordPress Plugin: Simple Basic Contact Form ]](http://perishablepress.com/wp/wp-content/images/2012/simple-basic-contact-form-01.jpg)
SBCF contact form (view more screenshots)
Features
Here are some of the main features for Simple Basic Contact Form:
- Slick, toggling-panel Settings Page makes it easy to customize
- Style the form via the Settings Page using your own custom CSS
- Provides template tag to display SBCF anywhere in your theme
- Provides shortcode to display SBCF on any post or page
- Displays customizable confirmation message to the sender
And even more features:
- Works perfectly without JavaScript.
- Option to reset default settings
- Options to customize many aspects of the form
- Options to customize success, error, and spam messages
- Option to enable and disable CSS styles
- Email message includes IP, host, agent, and other user details
- Customizable form-field captions, error messages, and success message
Here is a screenshot showing the SBCF settings page:
![[ WordPress Plugin: Simple Basic Contact Form ]](http://perishablepress.com/wp/wp-content/images/2012/simple-basic-contact-form-02.jpg)
SBCF Settings page (view more screenshots)
Anti-spam & Security
- Captcha – includes challenge question/answer (w/ option to disable for users)
- Firewall – secure form processing protects against bad bots and malicious input
- User-friendly – same-page error messages to help users complete required fields
Clean Codes
- Crisp, clean markup: clean source code with proper formatting, alignment and spacing
- Crystal clear emails: delivered emails deliver descriptive, well-formatted content
- Better performance: custom CSS styles load only where the contact form is displayed
Installation & Usage
Typical plugin install: upload, activate, and customize in the WP Admin:
- Unzip and upload the entire directory to your “plugins” folder and activate.
- Use the shortcode to display SBCF on any post or page, or:
- Use the template tag to display the SBCF anywhere in your theme.
- Visit the SBCF Settings Page to configure your options and for more information.
Shortcode
[simple_contact_form]
Template tag
<?php if (function_exists('simple_contact_form')) simple_contact_form(); ?>
Screenshots
Here are some screenshots of Simple Basic Contact Form running with WP’s default theme, Twenty Eleven (using default plugin options):
- Screenshot of email message
- Plugin settings (panels toggled closed)
- Plugin settings (panels toggled open)
- Screenshot of the contact form
- Screenshot showing “email sent!” message
Markup & Styles
Here is the HTML markup used to create the contact form (default settings):
<div id="simple-contact-form">
<form action="http://perishablepress.com/contact/" method="post">
<fieldset class="scf-name">
<label for="scf_name">Name (Required)</label>
<input name="scf_name" id="scf_name" type="text" size="33" maxlength="99" value="" placeholder="Your name" />
</fieldset>
<fieldset class="scf-email">
<label for="scf_email">Email (Required)</label>
<input name="scf_email" id="scf_email" type="text" size="33" maxlength="99" value="" placeholder="Your email" />
</fieldset>
<fieldset class="scf-response">
<label for="scf_response">1 + 1 =</label>
<input name="scf_response" id="scf_response" type="text" size="33" maxlength="99" value="" placeholder="2" />
</fieldset>
<fieldset class="scf-message">
<label for="scf_message">Message (Required)</label>
<textarea name="scf_message" id="scf_message" cols="33" rows="7" placeholder="Your message"></textarea>
</fieldset>
<div class="scf-submit">
<input type="submit" name="Submit" id="scf_contact" value="Send email">
<input type="hidden" name="scf_key" value="process">
</div>
</form>
</div>
And here is a complete set of CSS hooks for styling the form (visit the settings page to add custom styles):
div#simple-contact-form {}
div#simple-contact-form form {}
#simple-contact-form fieldset {}
#simple-contact-form label {}
#simple-contact-form input {}
#simple-contact-form textarea {}
#simple-contact-form fieldset input {} /* excludes submit button */
#simple-contact-form div.scf-submit input {} /* submit button */
#simple-contact-form input:focus,
#simple-contact-form textarea:focus {}
p.scf_spam,
p.scf_error {}
p.scf_success {}
p.scf_reset {}
#scf_success {}
#simple-contact-form fieldset input.scf_error {}
#simple-contact-form fieldset textarea.scf_error {}
Demos
I’ve got two demos of SBCF online, one here at Perishable Press and the other at my test site, Bluefeed.net. If you want to send a test email, please use the one at Bluefeed.net – thanks.
Download
Download SBCF from the WP Plugin Directory:
Download Simple Basic Contact Form
62 Responses
Prasad – November 17, 2012 •
Wow, a simple plug-in. Jeff, can I ask you a question? Why are there so many different contact form plug-ins out there?
I see people generally opting for CF7, and then the minute it goes wonky (which it does for some reason or the other), then panicing and looking at other options.
Believe me, even I have gone through the same routine. Until finally I ended up putting together a separate contact form which directly feeds data to our CRM.
Jeff Starr – November 17, 2012 •
I like simple plugins :) It’s a good point about there being a lot of contact form plugins, and I think that is a great thing. Think of how many websites use a contact form. Quite a few, and most of them want something specifically suits their needs. So they either get to choose from the many available plugins, or like yourself, opt to build their own. Which is what I’m doing really. All of these “simple” plugins were originally built for me and my relatively basic design goals. But I also like to share my work, so there you go.
Ade – November 17, 2012 •
The HTML needs a few simple accessibility-related improvements.
It dramatically misuses (and over-uses) fieldsets. They are NOT supposed to wrap single label/input pairs. And when used, they require a legend; but if you did that, the verbosity would go through the roof. Each input’s name attribute value should be understandable to humans because some accessibility APIs generate each label/input pair’s accessible name from that value rather than the label text. This is a result of the very bad habit of omitting labels. Removing the scf_ prefix would be ideal. It is very good to see someone writing “required” indication in plain text, though.
Jeff Starr – November 23, 2012 •
Thanks for the feedback Ade. Just out of curiosity, why shouldn’t fieldsets be used to wrap single label/inputs? Sounds interesting..
Ade – November 24, 2012
Fieldsets are only intended to group multiple label/control pairs that are directly related to one another. If there is no group, either because there is only one pair or there is no direct relationship, fieldsets should not be used.
They have to be used sparingly because they significantly increase the verbosity of a form by effectively adding content to every single label! Nesting is even worse, incidentally, for that reason. Added to that, any illogical grouping or overuse has potential for confusion.
If someone follows your example form, but adds legends (which all fieldsets require), an assisted user will find only one label/control pair per legend but expect more than one and may believe that they have missed some controls. I have seen this happen in test sessions.
Using fieldsets like that is rather like using a UL with only one item in it. Often, fieldsets can be more annoying than helpful.
Jeff Starr – November 24, 2012
Hi Ade, thanks for taking the time to explain. Question: when the legend tags are omitted is there any real reason not to use fieldsets for each label/input pair?
Dawson – November 22, 2012 •
Thanks Jeff for this simple and awesome contact form plugin. There are a bunch of crap contact form plugins out there but this one is clean and perfectly fits my requirement.
Keith Davis – November 23, 2012 •
I like the look of it Jeff
I’m changing themes on a client site thie weekend, I might give this one a try.
Thanks for sharing.
Jeff Starr – November 23, 2012 •
Awesome, let me know if anything could be made better for the next update.
Keith Davis – November 23, 2012
Just messing with the CSS
I’ll post you a link when the site is live.
Ade – November 24, 2012 •
@Jeff, re your last reply. Yes, as I mentioned, fieldsets require legends. I always advise firmly against resorting to invalid mark-up, not just because it is bad practice, but because it often results in less accessible mark-up.
And in your case, there is absolutely no need for those fieldsets to be there. Forms need only a single wrapper (e.g. div) inside the form tags.
Jeff Starr – November 24, 2012 •
In HTML5 legends in fieldsets are optional:
http://dev.w3.org/html5/spec/single-page.html#the-fieldset-element
So the markup is clean, easy to style, and more importantly valid. What I can’t find is where in spec it says that a “set” of form controls means “more than one.” Do you happen to have a reference for it?
Ade – November 24, 2012
Yes, I’m familiar with the HTML5 “spec”, but you no doubt know as well as I do that using any and all aspects of this draft spec in the real world, without consideration and testing, is foolhardy and frequently damaging to accessibility. HTML is supposed to be, as much as possible, reliable, universal and agnostic.
If you feel OK about omitting a legend, that is surely time to ask whether the fieldset is necessary in the first place. And consider the point of a legend: without it, a fieldset has no real practical purpose. Allowing its omission is an example of the wrong thinking that is quite common in HTML5.
Regarding grouping, the the HTML standard states that they are used to “group thematically related controls and labels”. In other words, more than just one label/control pair. Besides which, it is plain common sense and good practice for the reasons that I previously explained.
Jeff Starr – November 24, 2012
Ah, that’s the beauty of HTML spec, there’s plenty of room for interpretation and application. I get what you’re saying, but keep in mind that it’s just one possible way of doing it. I appreciate you taking the time to share your opinion, but there’s no need to deride other points of view as “foolhardy”.
Your interpretation of “group thematically related controls and labels” is debatable, leaving no real reason why anything should be changed in the plugin’s markup.
I think we should agree to disagree on this one :)
Ade – November 25, 2012 •
I would just like to point out, Jeff, that I did not deride anyone’s point of view, as you claim. That is not a fair interpretation of what I wrote. It is not just my interpretation, incidentally…
Jeff Starr – November 25, 2012 •
It’s all good Ade, you make some great points, I just happen to disagree with (most of) them.
Theo – November 26, 2012 •
Love simple things, will try this one, thank you!
Oliver – December 11, 2012 •
Hello Jeff,
i just installed your plugin and i get some problem.
we use cyrillic letters and i get some abracadabra chars inside form fields when user makes error and browser returns error page, the same i get on your demo page. otherwise email is sent ok with good chars.
what should i change then?
Mike – December 16, 2012 •
Hi Jeff,
I went to the following url to view the demo sbcf but it doesnt seem to be displayed there.
http://bluefeed.net/wordpress/simple-basic-contact-form/
Happy trails, Mike
David Beja – December 17, 2012 •
Hi Jeff,
Great plugin.
For me is missing only one option, the text that appears in the button to send the form. I’m using in another language and I could translate all fields in the settings except that one.
Jeff Starr – December 17, 2012 •
Thanks David, I’ve added that to the to-do list for the next update.
David – December 17, 2012
Great! Thanks
cowboy Mike – December 17, 2012 •
Hi Jeff,
I have been wrestling with the Contact Form 7 plugin. It is giving me fits in that it reports the form data has successfully been submitted but the email never arrives.
I have tried everything except using smtp mail. I looked at email logs, checked spam filters, had my hositng provide TMZvps look into it, etc. and I just cant get it resolved so I am going to make a run at your plugin.
Have you had any issues like what I just described… with your plugin? If your works I’ll be happy to donate. :-)
Can you please explain the difference between this plugin and Contact Coldform and why one might choose one over the other?
Happy trails, Mike
Jeff Starr – December 18, 2012 •
Hi Mike,
I’ve not experienced any sort of issues with SBCF, but have seen that some email plugins use
mail()to send messages instead of WP’s built-inwp_mail()functionality. I’m not sure which one CF7 uses, but Simple Basic useswp_mail.. if it doesn’t work, a quick check would be to edit lines 223/224 from “wp_mail” to “mail”.Scott – January 8, 2013 •
Hello, I want to hide the whole Message section, can you tell me how I do that with css? I’ve tried display:none on various elements, but can’t get it to hide the whole thing. This removes the box, but the container/row is still there
#simple-contact-form fieldset textarea {display:none;}Jeff Starr – January 8, 2013 •
Hi Scott, try adding this line to the Coldform’s “Custom Styles” field:
#simple-contact-form fieldset.coldform-message { display: none; }