Released: Contact Form Package

Note: this post is over a year old, it's very likely completely outdated and should probably not be used as reference any more. You have been warned. :-)

While building a website last week, I was looking for a way to make a simple contact form. Unfortunately, there was nothing available on our.umbraco.org. So I made my own package and it is now available for download. I've also added a tip to the forum to show how you can relay mail through Gmail if you don't have (or want) a mail server on your hosting machine.

Here's a few screenshots to show that it is highly configurable:

contactform1

Of course you can just enter some content and add the bodyText field to your template to make it show up on the contact page. Here you can see I added a "Thank you" page. After the website visitor submits the form, they will be redirected here. You can configure any other page that you want.

contactform2

Here again a reference to the thank you page. The form is completely empty by default so it might be a good idea to fill in the label names here.

contactform3

The error messages are also empty by default, add whatever text you need here.

contactform4

And finally you can set up some properties for the mail that will be sent.

Sebastiaan Janssen

Dutch guy living in (and loving) Copenhagen, working at Umbraco HQ. Lifehacker, skeptic, music lover, cyclist, developer.

 

10 comments on this article

Avatar for Sebastian Sebastian | October 16 2009 11:35
Hi - great work!
The best contact form i found for umbraco.
But i can't integrate it in the masterpage because i (and otners too) have Problems with the form tags: http://our.umbraco.org/projects/cultiv-contact-form/requests-and-questions/4411-Error-on-use---A-page-can-have-only-one-server-side-Form-tag
any Ideas?
greetz
Sewi

Avatar for Bill Smith Bill Smith | February 25 2010 11:02
I've installed and setup the form as instructed but cannot get any of the labels, validation or buttons to render.

I am using: umbraco v 4.0.3 (Assembly version: 1.0.3625.27276)

Do you have any ideas?
Best wishes,

Bill Smith

Avatar for Dave Dave | May 19 2011 11:40
A good form - but I'm with Sebastian here - I need to incorporate it in my masterpage and get the same error - any progress on a solution?
Cheers
Dave

Avatar for Dave Dave | May 19 2011 11:42
Sorry - forgot to say - I'm using Umbraco 4.5.2 if that makes any difference
Dave

Avatar for Sebastiaan Janssen Sebastiaan Janssen | May 19 2011 11:48
The solution would be to remove the extra form runat="server" tag. However, I don't know what other forms you're using on that page.

If you absolutely need 2 forms that run at the server on that page, make sure to add validationgroups to each form. For this package, you'd need to change the source as it's not built in (I have no plans of updating it any time soon either, I just don't have the time at the moment).

Avatar for Dave Dave | May 19 2011 15:00
Hi Sebastiaan
OK, maybe a simpler solution would be to open the window containing the contact form as a modal window and then close it when the email is sent, but I'm a noob to Umbraco and cannot see how to achieve this.
Any thoughts?
Dave

Avatar for Sebastiaan Janssen Sebastiaan Janssen | May 19 2011 15:21
Sounds like a plan! I've used the jQuery fancybox plugin for that in the past. It can open an iframe inside of the pop-up.

Come to think of it: you could also put the contact form in an iframe. This is not specific to Umbraco, it's just a bit of HTML (and maybe using the fancybox plugin).

Avatar for Jovan Jovan | September 22 2012 14:26
Best solution for contact form UMBRACO. Great idea!

Function successfully, but I have a problem with the design. How to setup in my master page?

Thank you.
Jovan

Avatar for Luis M Luis M | October 12 2012 01:35
Hi, could you me why umbraco shows this message in my email when send a contact form:
"the form Form was submitted, this is the list of values it contained, you can turn this email off under workflows in Umbraco Contour
Name:
Empty due to Umbraco Contour in trial mode
Email:
Empty due to Umbraco Contour in trial mode
Phone:
Empty due to Umbraco Contour in trial mode
Comment:
Empty due to Umbraco Contour in trial mode
Join Email List:"
Umbraco is very well, but this problem not understand. Thanks for all

Avatar for Luis M Luis M | October 12 2012 01:36
sorry my emails in the last message had some errors. Iam sorry. In that comment it is ok