Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jonas Eriksson 930 posts 1825 karma points
    Oct 04, 2010 @ 08:35
    Jonas Eriksson
    0

    Default values from logged in member? (feature question)

    Is it possible to make a form fill fields with values from for example the logged in members properties?

    Found this http://our.umbraco.org/forum/umbraco-pro/contour/9771-Default-Form-Values about the topic, might be the best options avaliable, dunno how hard it is to create a field type of my own tho. Perhaps a piece of cake?

    Regards

    /Jonas

  • Sebastiaan Janssen 5044 posts 15475 karma points MVP admin hq
    Oct 04, 2010 @ 08:37
    Sebastiaan Janssen
    0

    Works the same as documents and media, just go to the member section, go to member types, select your type and add properties to it. And in the API you can again get or set the property with .getProperty("myThing").Value.

  • Sebastiaan Janssen 5044 posts 15475 karma points MVP admin hq
    Oct 04, 2010 @ 08:38
    Sebastiaan Janssen
    0

    There's no XML cache for members by the way, it will involve an API call.

  • Jonas Eriksson 930 posts 1825 karma points
    Oct 04, 2010 @ 08:40
    Jonas Eriksson
    0

    Hi Sebastiaan,

    Yes, but in Contour - how do I use that value as a default one in a form field, guess your answer means it is a piece of a cake? *diving into it*

    Aha:

    http://our.umbraco.org/projects/umbraco-contour-shared-source

  • Sebastiaan Janssen 5044 posts 15475 karma points MVP admin hq
    Oct 04, 2010 @ 09:10
    Sebastiaan Janssen
    1

    Aah, wait I didn't see it was in the contour forum, sorry! 

    Ehm, of course you could set some of that user data in a cookie and use the bracket syntax for cookies in the default value field, or you could try to make a custom fieltType that would get the member property value for you (I'd prefer the last option).

    Would be nice to have a dropdown in the default value field which was populated with all of the member properties so you could choose from them. Would make a killer addition to the Contour Contrib project.. hmmm interesting!

  • Comment author was deleted

    Oct 04, 2010 @ 09:12

    Hi Jonas,

    What you could do currently is set some session variables when the member logs in and then use the bracket syntax on the default value property to populate fields with these values.

    More details on the default values feature: http://umbraco.org/documentation/videos/umbraco-pro/contour/contour-11-default-values

    I will however look into extending the bracket syntax so it's also possible to fetch member values (so you could simply do {member.firstname})

  • Jonas Eriksson 930 posts 1825 karma points
    Oct 04, 2010 @ 09:12
    Jonas Eriksson
    0

    :-)

  • Sebastiaan Janssen 5044 posts 15475 karma points MVP admin hq
    Oct 04, 2010 @ 09:13
    Sebastiaan Janssen
    0

    @Tim oooh, shiny!

  • Dan Okkels Brendstrup 101 posts 197 karma points
    Mar 25, 2011 @ 11:50
    Dan Okkels Brendstrup
    0

    There hasn't by any chance been any update to Tim's idea to enable e.g. {member.firstname} as a default value for a form? Would be tremendously useful!

     

  • Dan Evans 629 posts 1016 karma points
    Aug 06, 2011 @ 16:05
    Dan Evans
    0

    Does anyone know if this is possible yet?

  • Lori Shecter 3 posts 24 karma points
    Aug 06, 2011 @ 18:28
    Lori Shecter
    0

    Hi Jonas:

    On another note, we are a NY based web dev. company looking to build a network of Umbraco developers worldwide.  Please let me know if you would be interested in discussing.

     

    Thanks,

    Lori

    Lori at appdrenaline dot com

  • Sebastiaan Janssen 5044 posts 15475 karma points MVP admin hq
    Aug 07, 2011 @ 06:06
    Sebastiaan Janssen
    1

    @dan should be possible now according to the release notes : 

    http://our.umbraco.org/projects/umbraco-pro/contour

     

  • Sebastiaan Janssen 5044 posts 15475 karma points MVP admin hq
    Aug 07, 2011 @ 06:09
    Sebastiaan Janssen
    0

    @lori advertising is not allowed in forum posts, there's a jobs forum and you can postbyour ads there. Do note that your account will be disabled and your posts will be deleted if you post more ads anywhere else. Thanks.

  • Comment author was deleted

    Aug 07, 2011 @ 16:35

    Yup it is possible in 1.1.9 , I'll post some more details soon.

    basicly you set the default value to {member.propertyalias}

  • Dan Evans 629 posts 1016 karma points
    Aug 08, 2011 @ 00:32
    Dan Evans
    0

    Thanks guys. Works like a dream. I'm saving the member id as a label i an Umbraco doc then I can get all the properties I need from that.

  • Comment author was deleted

    Aug 09, 2011 @ 16:45

    Some details on the update: http://www.nibble.be/?p=106

  • Kristian Ravnevand 94 posts 214 karma points
    Sep 13, 2012 @ 15:56
    Kristian Ravnevand
    0

    Thanks Tim, for another great feature on Contour. The more I work with it the better it gets :-)

Please Sign in or register to post replies

Write your reply to:

Draft