Contact form with WordPress wp mail

I want to build a simple contact form, without plugins, on WordPress using the build in wp_mail function. Standard fields, email subject and message.

The following features are required:

Read More
  • Ajax Submit (nice to have) (I use the jQuery framework)
  • If Ajax submit, a non javascript
    fallback.
  • I’ll validate the form client side,
    but would also like to know the best
    way to do server side validation, and
    pass the message back, within the context of WordPress.

What is the best practice to achieve this? Any pointers or tutorials. I found this question of note.

If you thinking I’m just reinventing the wheel let me know. I normally use Contact Form 7 (plugin) but am bored of its heavy html markup and the way it loads JS on everypage.

Thanks!

Related posts

Leave a Reply

1 comment

  1. Contact Form 7 is written very well, and ripping apart the guts of that code is a great place to start for pointers and ideas.

    Most of the time you could just strip out the core functionality there, and just create a more lightweight front end to suit your needs.