views:

174

answers:

5

I am looking for free/opensource php form email script/class. The main requirement is that the PHP (logic) and the HTML and CSS (design) are separated, i.e. i can create forms as short or as long as i need with all kinds of inputs/fields and the script would handle the processing automagically.

The form should validate user input (check for empty fields, sanitise code and check emails against regular expressions), have the option to define required fields, have anti-spam features such as captcha, return errors so that they can be highlighted to the user and email results to specified address.

If possible have the ability to use it in commercial projects without back links.

So far I've found: PHPFormailMail but it doesn't seem to be supported anymore and Wufoo requires back links and is hosted offsite.

Not too much to ask? Does anything like this exist? Are there any web services they help create contact forms if no php script is available?

+1  A: 

It's not very hard to do this with php but there are nice methods you can use without writing code.

you could use the google docs forms to create forms and get submissions, very easy to use, you can even embed it into your website.

here is a link to see a little more about it

http://docs.google.com/support/bin/answer.py?hl=en&answer=87809

as an example, i created a form with the google docs and put it into an event on my website here:

http://www.antiyes.com/event/so-answer-1850656

it gets embedded with an iframe.

also, you can share the results or even make them public, ie.

http://spreadsheets.google.com/pub?key=t%5FivBxAmfmLm0z32trMk2%5Fg&single=true&gid=0&output=html

John Boker
+1  A: 

Have a look at form tools it is quite handy Open Source script that can manage forms on multiple websites.

Nazariy
+2  A: 

The Swift Mailer is quite featureful and well supported. It doesn't include Captcha support in itself, but should be easy enough to use with another captcha library.

I should also note, it is free (LGPL), actively developed, has excellent documentation and is modern best-practice Object-oriented PHP.

Nathan
Thanks for the tip Nathan, just the thing I was looking for.
Rowlf
+1  A: 

You have a huge "Features wish list" for a contact form!

I recommend you to search in hotscripts for something that suits your needs.

I've found three interesting resources in that list:

  1. Lexperts Contact Form
  2. contact us pro script
  3. Contacular

You can always try to create your own too: a good opportunity to learn some jQuery and it's wonderful validation plugin.

GmonC
Excellent point about hotscripts.com, its a great resource for quick-n-dirty solutions for things like this. So is phpclasses.org.
Brian Lacy
+2  A: 

Nobody seems to have mentioned PHPMailer-FE, you can use with multiple forms, it's a Form to Email gateway, you can add hidden fields for configuration, it's really nice. And it's from the same dudes that make PHPMailer, so It is GOOD. Here's the manual.

As for validation I suggest you use fValidator or LiveValidation, that way you can keep your forms separated with it's own validations each.

Hope it helps!

Eduardo Romero