Copied to clipboard

Flag this post as spam?

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

  • Josh Reid 182 posts 257 karma points
    Mar 30, 2013 @ 21:37
    Josh Reid

    Member Login FieldType (Addons.MemberTools) DefaultValue

    Hi Tim

    Do you know if there is any way to enable/disable DefaultValue for a custom FieldType?

    I'm building a Member profile management based on your codefirst approach using an adaption of the MemberLogin FieldType, but the problem is it has no DefaultValue setting available (it's not even showing in the contour Admin editor > Additional Settings).

    -- Snippet from Codefirst:

            [Field("Profile", FormFieldsets.Details,
                Type = typeof(Contour.Addons.MemberTools.Providers.FieldTypes.MemberLogin),
                Mandatory = true,
                Regex = @"^[A-Za-z0-9._%+-][email protected][A-Za-z0-9.-]+\.[A-Za-z]{2,6}$",
                DefaultValue = "{}")]
            public string Email { get; set; }

    Sidenote: DefaultValue works if I comment the Type line so is a default Textbox Type (but need the MemberLogin functionality).

    Any thoughts on how to enable the DefaultValue on this FieldType?


  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Apr 03, 2013 @ 13:04
    Tim Geyssens

    Hmm the Contour.Addons.MemberTools.Providers.FieldTypes.MemberLogin will probably need an update then, it must be missing the default value setting

  • Josh Reid 182 posts 257 karma points
    Apr 04, 2013 @ 00:10
    Josh Reid

    I have the Fieldtype code here but can't see anywhere how to enable/disbale the Default Value setting.

    Assume it may be similar to adding the SupportRegex?

    Could you provide a snippet or the correct setting variable, etc?

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Apr 04, 2013 @ 09:33
    Tim Geyssens

    Nope it's like you would add a custom setting

     [Attributes.Setting("DefaultValue", description = "Enter a default value", control = "Umbraco.Forms.Core.FieldSetting.TextField")]        public string DefaultValue { get; set; }
Please Sign in or register to post replies

Write your reply to: