Contour forms and Umbraco members
Contour 1.1.9 has just been shipped. It’s a minor release, but it adds a nifty little feature making it super easy to work with member data. Default values and workflow settings bracket syntax has now been updated to support member values.
Member values as default field values
Say that you have a comment form on your website with the standard fields (name, email, website and comment).
In the case when an Umbraco member is currently logged in and you want to pre-populate the name and email fields with the values from the logged in member, it’s now just a matter of setting the default value using the bracket syntax.
You can access: member.id, member.loginname, member.email and for custom properties simply use the alias member.customalias.
Full details on the syntax can be found in the Contour developer documentation.
Member values in workflow settings
Of course it’s also possible to use this syntax in workflow settings. For example, sending an email to the current member when a form has been submitted, just set the email setting to {member.email}
Member profile editor
Combine the default values with a workflow that will update the member details and you have a member profile editor.
Let’s start with a simple member type with just a single property with the alias custom.
I want the members to be able to edit their email and the value for the custom property so I’ll create a form with 2 fields (email address and custom property).
The default value of the email field has been set to {member.email}
And the one for custom property has been set to {member.custom}
So now if I request the form when I’m logged in as an Umbraco member, the fields should be populated with the current member values.
The next step is to make sure the member values get updated when the form is submitted. This can be done with a workflow (workflow is part of the contour strikes again project).
The workflow simply maps the member type properties to the contour form fields. When the form is submitted the member properties will be updated. Once this is in place you have a working profile editor.
Make sure you have at least Contour version 1.1.9 in order to use these features. Install and upgrade instructions can be found on the contour project page.
Hi Tim, after your presentation at CG11 i was asked to make a registration form just the way you did it. But really dont know how to get started and dont know how to create the Member Type and the mapping.
Can you explain please and help me get started.
@Fuji, I’ll do a detailed post in the next couple of days on how to setup a registration form
Is there any way to provide a parameter to a datasource(culture code) to complete a drop-down? We have a multi-lingual site and our values for the dropdowns are stored in a database, grouped by culture. So, if you are on the site in Turkish, it should pull the values for the TK culture to fill the dropdown lists.
Any ideas?
Thanks.
Sean
Thanks Tim, looking forward for this. I already set up contour and working on Contact and Comment form. However i noticed that when i create a filter in my workflow i just loose all my content of the comments. Any idea?
Hello Tim,
How do I get and install the contour strikes again package? I can’t find a download on the codeplex page and the project doesn’t seem to be listed under the projects in our.umbraco.org.
Next to that I’d like to add my 2 cents to post about a registration form. Any change of blogging that?
I’ve been hoping for this functionality to end up supported in contour for quite some time; thrilled it’s finally here!
Kind regards
Pieter
Hi Tim, any updates there??
@Fuji, post coming next week
Great Thanks
Hi Tim
I tried to use member values as default field values and it works just fine, when the user is logged in, but if the user is not logged in, the form outputs eg. {member.email} in the input field. Do you have any idea on how I can solve this, so the value is there, if the user is logged on and empty if not?
@Fuji details are up http://www.nibble.be/?p=107
Tim thanks for the members section for contour. However i can get the Invalid Error message to pop up when using the same member email address which is unique. nothing appears, instead am still getting “Email Mandatory” even after changint the “Invalid Error Message” in the form entries.
do you have any tips on getting active directory to work?
I can get it so that AD members can log in using standard asp.net login controls etc.. but as an admin user in umbraco I can’t see anything in the members section at all.. it just spins..
Hi, how do I get the members name? tried {member.name} and {member.nodeName}
thanks
Hi Tim,
I am creating a contact us form and required user to key in the date of birth. But we need user to select day, month and years from dropdownlist instead using a datepicker.
I tried create a field type but don’t think so it work out.
Can you please advice me what is the best solution for this?
Regards,
Tammy
Great goods from you, man. I have remember your stuff prior
to and you are just extremely excellent. I actually like what you have obtained
right here, really like what you’re saying and the best way wherein you assert it. You’re making it entertaining and you still care for to stay it smart. I can not wait to learn far more from you. This is really a terrific website.
I too would like to find that Contour Strikes again package. I’m trying to figure out how to create a Registration form in Contour 1.1.12 that creates a member in the Umbraco membership tables. I need to be able to approve registrations so Contour handles that well and exporting registered user to an email list is also easy from Contour. So I just need to find a way to create the member entry in the membership tables.
Hi!
Great job! I just have one kind of big issue with the UpdateUmbracoMember.cs. I would like to be able tu update a member property to nothing.
if a member has a property for something filled out, and they want to blank that field, the update is not done to that property. I could of caurse change the code to enter in empty data, but that would just overwrite all other properties not chosen in the workflow.
Any idea on how to fix this?
This is really interesting, You are a very skilled blogger.
I’ve joined your rss feed and look forward to seeking more of your magnificent post. Also, I have shared your web site in my social networks!
Hi, great post thanks.
I’m using a custom membership provider and in using the syntax {member.email} it fails as its using the member provider expected;
umbraco.cms.businesslogic.member.Member.setupNode()
any ideas how to get the contour form fields to call my membership provider for all bracket syntax values ?
his is really interesting, You are a very skilled blogger.
I’ve joined your rss feed and look forward to seeking more of your magnificent post. Also, I have shared your web site in my social networks!
I feel this is among the such a lot significant information for me.
And i am glad studying your article. But wanna statement on few common things, The
web site style is wonderful, the articles is truly great : D.
Good job, cheers
Tim, The website linked by the message starting “Wow! This blog…” is a site with a trojan exploit. It might be an idea to remove that post, if you can.
Hey! This is kind of off topic but I need some help from an established blog.
Is it tough to set up your own blog? I’m
not very techincal but I can figure things out pretty quick.
I’m thinking about setting up my own but I’m not sure where to begin.
Do you have any tips or suggestions? Appreciate it
Feel free to visit my homepage - หาเงินผ่านเน็ต
It’s just like a really sad movie or a really action packed book; people don’t respond as well a second or tenth time to
things they’ve read or seen before. Present an incentive for new people today to like your web
page, anything that other people are not finding. Targeting friends of connections
increases the relevance of your ad.
Look at my web site: fb ads cracked 2 review
You ought to make note of and produce your own record as simply how much get and just how much
burning have been there in your game file.