Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress form handling

I need to add a basic form page in the website, that runs on WordPress framework.

I have the following raw materials ready: Client side: html form layout,css and jquery validation code. Server side: form handler php function that processes the $_POST[] data.

My problem is to integrate this code in the Wordpress framework.

I have looked at some plugins but they are doing much more than I would like and also they have their own validation which is cumbersome to change.

Could anyone suggest a good form plugin that allows just the framework hooks ? Or is it worthwhile that I should write the plugin myself.

Thanks.

like image 209
sbr Avatar asked May 13 '10 06:05

sbr


People also ask

Where do WordPress form submissions go?

Hi, It goes to the account email address of the author of the page/post in which the contact form appears, by default, but that can be changed. See the Notification preferences section of the Contact Form support page.


1 Answers

You can create a page template in the theme folder you are using that can handle this. Simply add your custom PHP code and xHTML mark up for the form. When setting the form action all you should have to do is set it to post and the page will post to itself. This may require you to add some additional logic to see if the $_POST vars are set and to process them if they are, but it's easy, clean, and will also let you give the user a status message if you are doing any kind of success/failure checking.

Alternatively you could look to using the following plugins that make this a cinch:

  • Cforms II
  • Contact Form 7
  • Gravity Forms (Premium Plugin)
like image 121
hsatterwhite Avatar answered Oct 23 '22 22:10

hsatterwhite