More stories
Share
Tuesday, November 6, 2012

Contour 3.0 Beta

It's been almost 3 years since we released our  form builder addon Contour (time sure flies) and today we are happy to announce a new upcoming version that has some much requested features!

Here's an overview of the new stuff you can expect:

Conditional logic

Hiding or displaying a field depending on the value from another field, that's now possible with the addition of conditional logic.

Rules can be easily added on fields with the new UI component (found in he additional settings of each field).

image

Easier to work with lots of forms

There are 2 improvements in there that should make it easier when you have a large amount of forms.

Creating some structure in your collection of forms by creating folders.

image

And saving form settings as default so they are applied to all future forms.

image

Full control over form markup

Version 3 introduces an alternative to the webcontrols form macro by adding an MVC alternative.

image

The MVC version will use razor views to render the form and these razor views can be edited to generate the form markup you want! This will of course also work perfectly in a non MVC umbraco install.

image

Code first

Inspired by uSiteBuilder we've added a code first framework that will allow developers to design forms in Visual Studio (source controlled forms, automated deployments, unit testing, … are just a couple of the advantages).

Here's an example:

 [Form("Contact Form", MessageOnSubmit = "Thank you")] public class ContactForm : FormBase { [Field(FormPages.Contact, FormFieldsets.Details, Mandatory = true)] public string Name { get; set; } [Field(FormPages.Contact, FormFieldsets.Details, Mandatory = true)] public string Email { get; set; } [Field(FormPages.Contact, FormFieldsets.Details, Mandatory = true, Type = typeof(Umbraco.Forms.Core.Providers.FieldTypes.Textarea))] public string Message { get; set; } public override void Submit() { umbraco.library.SendMail( Email, "me@company.com", "New Contact", string.Format("New message from {0} : {1}",Name,Message), false); } } 


The code will result in the following form:

image

Another feature of this approach is that it makes it super easy to add custom validation rules

 public override IEnumerable<Exception> Validate() { var e = new List<Exception>(); //extra validation rules if (Date < new DateTime(2012, 01, 01)) e.Add(new Exception("Date has to be after 2012/1/1")); if(Password != RepeatPassword) e.Add(new Exception("Passwords must match")); return e; } 

Try it today

The beta build can be found on our build server

Be sure to keep an eye on the blog for more in detail posts on the new features.

Related Story

Contour 3.0 Features: Code First

If you don't know Umbraco, here are some numbers behind the world's friendliest CMS

One of the biggest benefits of using Umbraco is that the community is incredibly pro-active, extremely friendly and helpful.

Chances are that if you get an idea for something you would like to build in Umbraco, someone has already built it. So it is very likely that you can get good and friendly advice from someone from the Umbraco community on Our - just ask.

Number of active installs
443.450
Number of active members in the community
220.022
Known free Umbraco packages available
320

Want to be updated on everything Umbraco?

Be among the first to know about special offers on our products and services. Get invitations to Umbraco events and festivals sent directly to your inbox.

All you need to do is get on our mailing list and soon you'll become a true Umbraco-know-it-all.

Sign up for Umbraco newsletters and offers

Are you sure, that's your real e-mail?