Fall Sale! Code FALL2024 takes 25% OFF our Pro Plugins & Books »
Web Dev + WordPress + Security

WordPress Plugin: Simple Basic Contact Form

[ WordPress Plugin: Simple Basic Contact Form ] 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. Either way, thanks for visiting.

Update!

As explained here, I no longer own or develop Simple Basic Contact Form. Since selling the SBCF plugin, I have developed a much better, faster, more awesome contact-form plugin. Check out Contact Form X at the WP Plugin Directory. I use Contact Form X for my own contact form here at Perishable Press. It’s all Ajax-powered and super easy to use. Check it out!</update>

Overview

Here are some of my favorite features of Simple Basic Contact Form:

  • Plug-n-play – display the contact form anywhere
  • Sweet emails – SBCF sends descriptive, well-formatted messages
  • Safe and secure – SBCF blocks automated spam and malicious content
  • Ultra-clean code – SBCF is lightweight, standards-compliant, and secure
  • Fully customizable – SBCF is easy to configure and customize

Here is a screenshot showing the form displayed on WP’s default Twenty Sixteen theme:

[ WordPress Plugin: Simple Basic Contact Form ]
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 ]
SBCF Settings page (view more screenshots)

Anti-spam & Security

  • Captcha – includes challenge question/answer
  • Firewall – protects against bad bots and malicious input
  • User-friendly – error messages help users complete required fields

Clean Codes

  • Crisp, clean markup: source code properly formatted and 100% valid
  • Crystal clear emails: delivers well-formatted, plain-text email messages
  • Better performance: CSS loads only where contact form is displayed

Installation & Usage

Typical plugin install: upload, activate, and customize in the WP Admin:

  1. Unzip and upload the plugin to your “plugins” folder and activate
  2. Use the shortcode to display SBCF on any post or page, or:
  3. Use the template tag to display the SBCF anywhere in your theme
  4. Visit SBCF Settings to configure your options and for more infos

Shortcode

[simple_contact_form]

Template tag

<?php 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):

Markup & Styles

Here is the HTML markup used to create the contact form (default settings):

<div id="simple-contact-form" class="scf">
	<form action="http://example.com/contact/" method="post">
		<fieldset class="scf-name">
			<label for="scf_name">Your Name</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">Your Email</label>
			<input name="scf_email" id="scf_email" type="text" size="33" maxlength="99" value="" placeholder="Your Email" />
		</fieldset>
		<fieldset class="scf-subject">
			<label for="scf_subject">Email Subject</label>
			<input name="scf_subject" id="scf_subject" type="text" size="33" maxlength="99" value="" placeholder="Email Subject" />
		</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="Correct Response" />
		</fieldset>
		<fieldset class="scf-message">
			<label for="scf_message">Your Message</label>
			<textarea name="scf_message" id="scf_message" cols="33" rows="7" placeholder="Your Message"></textarea>
		</fieldset>
		<div class="scf-submit">
			<input type="submit" id="scf-button" value="Send email">
			<input type="hidden" id="scf-key" name="scf-key" value="process">
			<input type="hidden" id="scf-nonce" name="scf-nonce" value="1234567890" />
		</div>
	</form>
</div>

And here is a complete set of CSS hooks for styling the form (visit the settings page to add custom styles):

/* contact form */

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 {}

fieldset.scf-name {}
fieldset.scf-email {}
fieldset.scf-subject {}
fieldset.scf-response {}
fieldset.scf-message {}

div.scf-submit {}

input#scf_name {}
input#scf_email {}
input#scf_subject {}
input#scf_response {}
input#scf_message {}
input#scf-button {}

/* successful result */

div#scf_success {}
div#scf_success pre {}
p.scf_success {}
p.scf_carbon {} 
p.scf_reset {}

/* error */

p.scf_spam {}
p.scf_error {}
input.scf_error {}
textarea.scf_error {}

Download

As explained at the beginning of this post, I no longer own or help develop Simple Basic Contact Form. The plugin is in good hands, but I built a better, faster, more awesome contact-form plugin. Check it out and download via the WP Plugin Directory:

About the Author
Jeff Starr = Fullstack Developer. Book Author. Teacher. Human Being.
Banhammer: Protect your WordPress site against threats.

66 responses to “WordPress Plugin: Simple Basic Contact Form”

  1. cowboy Mike 2013/04/08 5:55 am

    Hi Jeff,
    Could you please read my post above dated January 31, 2013, and see if you might have a suggestions for me?
    Thank you very much and happy trails,
    Mike

  2. cowboy Mike 2013/04/08 4:20 pm

    Howdy Jeff,
    The sbcf is working just fine for me out of the box with the exception is doesnt send a carbon copy to sender. Do you know how I might troubleshoot this?
    Happy trails, Mike

    • Jeff Starr 2013/04/09 2:22 pm

      Yes, there is a setting box that must be checked to enable the carbon copies.. if you’ve already tried that and it’s still not working, have a look at 229-234 in the plugin file. Those lines contain the two mail functions, one for sending the original and the other for sending the carbon copy.

  3. Matt Mayes 2013/04/16 2:30 pm

    Having trouble customizing the “message sent” appearance on my site. Is there a particular div that i should style or position for this, to change from the default? maybe something like .scf_success {display:absolute; …etc ;} ?

  4. Matt Mayes 2013/04/16 2:47 pm

    part two: I tried this and it is working pretty good for me in my css. I’m experimenting with different attributes for it now.

    #scf_success {}

  5. Thanks for this great plugin. I’m just having one issue with it: the offset does not appear to be having any affect on the time of message. It just displays UTC no matter what I put in for offset.

    Am I missing something else that needs to be set for this to work?

    • Jeff Starr 2013/04/25 2:02 pm

      Hmm, not sure what’s changed or at issue, but have added this to the to-do list for the next update. Thank you for providing feedback.

  6. Bob Garon 2013/05/02 8:17 am

    I cannot get this to work and it seems like it should be super simple. I inputted my email address into the settings and added the form to my page, but I never receive the email. Please advise!

    • Jeff Starr 2013/05/02 1:17 pm

      Some servers have different rules for sending mail. Do you know if it’s possible to send mail using any other plugin? That will let you know if the issue is related to how the server is setup to handle mail.

      • Bob Garon 2013/05/02 4:02 pm

        I tried another plugin and the same result occurred with nothing being sent.

  7. It is possible for me to get the code in a page template format instead of a plugin?

    • If I had it ready I would post it, but currently it’s written as a WP plugin. But there should be plenty of good standalone scripts that should be suitable.

  8. Hi there-I would like to make some edits to the layout of the form:

    1. No initial content in the field
    2. the label under the field.
    3. Change “send email” on submit button to something else.

    I looked to where to edit the HTML markup for the layout but cannot find it-Thanks

    • Hi Caroline, the form is generated from the main plugin file, simple-basic-contact-form.php. Look for the function, scf_display_contact_form(), on around line 246.

      • Thanks that did the trick. Thanks for a great and easily customizable form

  9. I like this form I’m currently using it. It seems to work fine and it’s not complicated. Nice plugin.

  10. Mike Jones 2013/06/05 11:51 am

    Can I have the message sent to more than one of my email addresses?
    Thank you

    • Hi Mike, no but there is a carbon copy setting that may help. Also the plugin may be modified easily to send email to as many addresses as you would like. Open the main plugin file and add the following just after line 230:

      wp_mail('another@example.com', $topic, $fullmsg, $headers);
      wp_mail('and-another@example.com', $topic, $fullmsg, $headers);
      wp_mail('and-another@example.com', $topic, $fullmsg, $headers);

      Repeat for as many emails as needed :)

  11. Thanks for this great plug-in! Developers always say “it’s easy to use” and I think “yeah, yeah” but this actually was. I got it up and running in about 5 minutes.

    And, I find your use of “carbon copy” amusing. I am old enough to have actually USED carbon paper…a LOT… so glad those days are over. : )

    Have a great day,
    N.

Comments are closed for this post. Something to add? Let me know.
Welcome
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
Wizard’s SQL for WordPress: Over 300+ recipes! Check the Demo »
Thoughts
I disabled AI in Google search results. It was making me lazy.
Went out walking today and soaked up some sunshine. It felt good.
I have an original box/packaging for 2010 iMac if anyone wants it free let me know.
Always ask AI to cite its sources. Also: “The Web” is not a valid answer.
All free plugins updated and ready for WP 6.6 dropping next week. Pro plugin updates in the works also complete :)
99% of video thumbnail/previews are pure cringe. Goofy faces = Clickbait.
RIP ICQ
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.