Nibble

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).

clip_image002

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.

image

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}

clip_image006

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.
clip_image008

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).

clip_image010

The default value of the email field has been set to {member.email}

clip_image012

And the one for custom property has been set to {member.custom}

clip_image014

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.

clip_image016

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).

clip_image018

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.

45 Comments so far

  1. Fuji Kusaka on August 10th, 2011

    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.

  2. Tim Geyssens on August 11th, 2011

    @Fuji, I’ll do a detailed post in the next couple of days on how to setup a registration form

  3. Sean on August 12th, 2011

    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

  4. Fuji on August 15th, 2011

    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?

  5. happyfanaticsalsero on August 18th, 2011

    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

  6. Fuji on August 19th, 2011

    Hi Tim, any updates there??

  7. Tim Geyssens on August 19th, 2011

    @Fuji, post coming next week

  8. Fuji on August 20th, 2011

    Great Thanks

  9. Rasmus on August 22nd, 2011

    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?

  10. Tim Geyssens on August 23rd, 2011

    @Fuji details are up http://www.nibble.be/?p=107

  11. Fuji on August 23rd, 2011

    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.

  12. Tom on August 24th, 2011

    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..

  13. Rachael on October 14th, 2011

    Hi, how do I get the members name? tried {member.name} and {member.nodeName}

    thanks

  14. Tammy on January 19th, 2012

    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

  15. RResultats PMU on June 7th, 2012

    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.

  16. Janet Kirklen on July 13th, 2012

    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.

  17. Christopher on July 31st, 2012

    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?

  18. best blog host sites on August 13th, 2012

    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!

  19. Wayne on October 25th, 2012

    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 ?

  20. Iwin on December 26th, 2012

    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!

  21. http://www.superflyjordans.com on March 9th, 2013

    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

  22. William on December 3rd, 2013

    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.

  23. 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 - หาเงินผ่านเน็ต

  24. fb ads cracked 2 review on April 26th, 2014

    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

  25. Rickie on April 27th, 2014

    It’s actually very difficult in this busy life to listen news on TV, thus I simply
    use world wide web for that reason, and take the latest news.

  26. unique cake topper on April 27th, 2014

    I enjoy what you guys tend to be up too. This kind of clever work and
    exposure! Keep up the amazing works guys I’ve added you
    guys to my blogroll.

  27. Anderson on April 27th, 2014

    Hello There. I found your blog using msn. This is an extremely well written article.
    I will be sure to bookmark it and return to read more
    of your useful information. Thanks for the post. I will definitely comeback.

  28. Debt Repayment on November 20th, 2014

    Everyone loves what you guys are usually up too. This kind of clever work and coverage!
    Keep up the great works guys I’ve you guys to my own blogroll.

  29. specialized crosstrail hybrid bike on November 25th, 2014

    What’s up, constantly i used to check website posts here
    in the early hours in tthe break of day, as i love to learn more and more.

  30. extention de cheveux on November 28th, 2014

    Good Article!

  31. Read about peter deeb on November 29th, 2014

    It’s remarkable to pay a visit this site and reading the views of all friends
    about this post, while I am also zealous of getting experience.

  32. Economy Int L Shipping Sumas on December 8th, 2014

    hello!,I love your writing so much! share we keep up a correspondence extra approximately your article on AOL?
    I need a specialist in this space to solve my problem. Maybe that is you!
    Having a look forward to peer you.

  33. Peluang Usaha Laundry Kiloan on December 10th, 2014

    In some cases it may be duue to unrealistic expectations, but in many ases it is simply a question of misinformation. Especially when it comes to small business marketing - a rapidly evolving and exxpanding fkeld - it seems
    like there iss way more information out there than any small business owner could feasibly comprehend and follow.

    However, these days, many small business owners are trying out different ways onn how to advertise aand market
    thekr products in such a way that it would be efficient even iif
    it does not cost much. Yet, this belief may be costing them dollars and customers.

  34. Macam-Macam Peluang Bisnis UKM on December 10th, 2014

    I ought to say at this point that what you wear
    for your online business is entirfely up to you.

    Your goal should be to listen to your custoers the majority of the time (around 80%) and thn talk
    for the rest of the time. More and more people keep bjying and selling and
    producing clothing more than any business in the
    world. Remember, your laptop bag and other accessories, do not have to match what
    you’re wearing.

  35. If yyou are an aspiring entrepreneur looking tto get associates, don’t
    be afraid. They taught me that when I’m riding a wave, the clue
    for the nezt wave is always in front of me. 3- How many people may be looking for opportuniy inn a failing economy.
    This could be the start of a wonderful nnew life so yyou need
    to make sure that your first experience in MLM won’t leave you feeling robbed.

  36. Ship From Usa To Canada Chilliwack on December 10th, 2014

    Thanks to my father who informed me on the topic of this website, this webpage is truly remarkable.

  37. External Blinds Vancouver on December 11th, 2014

    This website certainly has all of the information I wanted about this subject and didn’t know who to ask.

  38. izrada sajta on December 11th, 2014

    A further important feature to ensure that is your web designer makes the website navigation as simple as possible for your site visitors.
    S, but when it comes to preparing a world-class website, Web Design Miami stands a level ahead.
    In conclusion Word - Press is a great platform to begin blogging or for a simple web design.

  39. kamen oblutak on December 11th, 2014

    Most of the Limestone is created through chemical deposition or by shells accumulation. You will
    be shocked just how your landscape could give
    you an opportunity to simply breathe. There are a lot
    of styles: you can have the garden full of trees, flower beds, vegetable beds.

  40. Lan on December 12th, 2014

    That is very fascinating, You’re an excessively professional blogger.
    I’ve joined your rss feed and stay up for seeking more of your excellent post.
    Additionally, I have shared your website in my social networks

  41. Large poultry chicken House on December 13th, 2014

    Excellent site you’ve got here.. It’s hard to find high-quality writing like yours these days.

    I really appreciate individuals like you! Take care!!

  42. auto skola beograd on December 14th, 2014

    While most reputable truck driving schools formulate their CDL training programs based on the model curriculum
    designed by the United States Department of Transportation,
    there are still differences in the duration of the courses
    offered by each school. The driving school, which is more near to your residence will
    be a better option for you. For those drivers that can’t act accordingly, the result can be terrifying.

  43. Crime City hack on December 16th, 2014

    There is certainly a great deal to know about this issue.

    I love all the points you’ve made.

  44. Canada Customs Broker Surrey on December 17th, 2014

    I read this paragraph completely concerning the
    difference of most recent and preceding technologies, it’s amazing article.

  45. gadai bpkb motor on December 21st, 2014

    Remarkable issues here. I’m very glad to see your post. Thank you so much and I am taking a look ahead to contact you.
    Will you please drop me a mail?

Leave a Reply