justnew77 Posted November 22, 2013 Share Posted November 22, 2013 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? 1 Link to comment Share on other sites More sharing options...
diogo Posted November 22, 2013 Share Posted November 22, 2013 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. 2 Link to comment Share on other sites More sharing options...
RyanJ Posted November 22, 2013 Share Posted November 22, 2013 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"); 2 Link to comment Share on other sites More sharing options...
ryan Posted November 24, 2013 Share Posted November 24, 2013 FormBuilder is also a good way to go for contact forms, especially if you want to set one up without doing any development and have a lot of pre-bundled options as to where the submitted data goes. 5 Link to comment Share on other sites More sharing options...
giannisok Posted September 6, 2016 Share Posted September 6, 2016 Check my post here: 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now