Copied to clipboard

Flag this post as spam?

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


  • Henning Molbaek 49 posts 99 karma points
    Apr 28, 2015 @ 11:20
    Henning Molbaek
    1

    Default value from members in Umbraco Forms V4.1

    I'm building an intranet for a client. I would love to add a value from the logged in member to the DefaultValue of a hidden field. Is that possible?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Apr 28, 2015 @ 11:37
    Dennis Aaen
    0

    Hi Henning,

    Have you tried something like this using the following syntax, that worked for Contour. Perhaps it´s worth to try this, and see if this syntax also works for Umbraco Forms.

    Id
    {member.id}
    Login name
    {member.loginname}
    Email
    {member.email}
    Custom property
    {member.propertyalias}

    Hope this can help. Don't know if it's actually will work.

    /Dennis

  • Henning Molbaek 49 posts 99 karma points
    Apr 28, 2015 @ 11:52
    Henning Molbaek
    0

    When I add {member.loginname} to DefaultValue and try to load the page with the form:

    Error loading Partial View script (file: ~/Views/MacroPartials/InsertUmbracoForm.cshtml)

  • Comment author was deleted

    May 06, 2015 @ 14:25

    Should be supported but you might have run into a bug, will test the same setup and let you know

  • Comment author was deleted

    May 07, 2015 @ 13:58

    Just tested and it worked in my setup, do you have any entries in the log from that error that might give us some more information?

  • Henning Molbaek 49 posts 99 karma points
    May 27, 2015 @ 09:54
    Henning Molbaek
    0

    Does this give any hints? What exactly did you write in the field?

    at ASP._Page_Views_MacroPartials_RenderUmbracoFormScripts_cshtml.Execute() in c:\xxxxxxxxxx\Views\MacroPartials\RenderUmbracoFormScripts.cshtml:line 8
    at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
    at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
    at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
    at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)
    at Umbraco.Web.Mvc.ControllerExtensions.RenderViewResultAsString(ControllerBase controller, ViewResultBase viewResult)
    at Umbraco.Web.Macros.PartialViewMacroEngine.Execute(MacroModel macro, IPublishedContent content)
    at umbraco.macro.LoadPartialViewMacro(MacroModel macro)
    at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
  • bob baty-barr 1180 posts 1294 karma points MVP
    Jun 18, 2015 @ 20:15
    bob baty-barr
    0

    i am having same issue. Has anyone solved this?

  • marcelh 171 posts 471 karma points
    Aug 18, 2015 @ 11:46
    marcelh
    0

    I'm running into a NullReferenceException when using defaultvalues for a logged in member. See https://our.umbraco.org/forum/umbraco-pro/contour/70575-nullreferenceexception-on-umbraco-forms-with-defaultvalue-for-logged-in-member

  • Henning Molbaek 49 posts 99 karma points
    Nov 25, 2015 @ 08:10
    Henning Molbaek
    0

    Still not fixed.

  • Eric Petersson 33 posts 117 karma points
    Feb 01, 2016 @ 15:46
    Eric Petersson
    0

    Has anyone solved this yet? Running into the same issue with the Partial view error.

  • Sam Gooch 7 posts 27 karma points
    Feb 03, 2016 @ 17:26
    Sam Gooch
    0

    Bump

Please Sign in or register to post replies

Write your reply to:

Draft