Jump to content

I need only a contact form


justnew77
 Share

Recommended Posts

Hi folks,

how can I do a simple contact form with PW?
I need Name, Adress, Mail and a checkbox

I find a lot of stuff here in the forum but nothin what I cant understand, because nothing wehre show from scratch.

So here are the main questions:

Where put I the HTML form code? Inside a new template? Or inside the content field?
And how can I do the  form validation? Ist there a modul ready to go for PW?

(not the formBuilder because ist costs money)
 

If not, where put I the PHP code for validation?

I just camo from MODx, and I wonder how dificult it is to build a simple form in PW.

It might be something to do that I am new to PW, but for now I do not understand how it works

to build a form inside PW with validation and so on.

What I need is a simple step to step tutorial for beginners. Is there anything like that?

  • Like 1
Link to comment
Share on other sites

There is a simple module that does this already http://modules.processwire.com/modules/form-template-processor/, the good thing is that it's a also a well commented starting point for something more complex. You might want to also have a look at this module http://modules.processwire.com/modules/form-template-processor-mailer/ that was already built from the previous one.

  • Like 2
Link to comment
Share on other sites

Hi, Here are a few links to get you started.

Has example of a form built already

http://processwire.com/talk/topic/59-module-want-form-builder/page-4#entry11639

A tutorial on building forms using PW fields. You should read through this and compare it to Ryan's post below. It will explain a lot.
http://processwire.com/talk/topic/2089-create-simple-forms-using-api/

Ryan's simple contact form. I just used this the other day. All you really have to do is copy and paste his code. You would exclude the include("./main.php"); unless you have one of course and echo out the form as shown below.

http://processwire.com/talk/topic/407-processing-contact-forms/?hl=%2Bcreate+%2Bsimple+%2Bcontact+%2Bform#entry3208

include("./head.inc");
echo $page->body;
include("./foot.inc");
  • Like 2
Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...