Copied to clipboard

Flag this post as spam?

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


  • aaeda 113 posts 146 karma points
    Nov 25, 2016 @ 13:01
    aaeda
    0

    Set selected value of dropdown list in umbraco back office

    Hello,

    I have a form that the user fills and this is automatically populated as an umbraco node in the back office. I have a dropdown list on the form and I want to set the selected value when the record is selected in Umbraco office. The other values captured on the site are appearing fine except for the dropdown. Is there any way of doing that?

    Thanks Aaeda

  • Marcio Goularte 356 posts 1248 karma points
    Nov 25, 2016 @ 13:08
    Marcio Goularte
    0

    Hi Aaeda,

    which Umbraco version? do you use any packages? If you can show some code

  • aaeda 113 posts 146 karma points
    Nov 25, 2016 @ 13:16
    aaeda
    0

    Hello

    I am using umbraco version 7.5.4 and Smart Blog package. Please see below the piece of code to create the node in umbraco.

     Dictionary<String, Object> colProperties = new Dictionary<String, Object>() { 
                  {"nomDeLorganisation", HttpUtility.UrlDecode(Model.strNomDeLorganisation)},
                    {"nomDuContact", HttpUtility.UrlDecode(Model.strNomDuContact)},
                    {"telephone", HttpUtility.UrlDecode(Model.strTelephone)},    
                    {"email", HttpUtility.UrlDecode(Model.strEmail)},
                    {"categorie", HttpUtility.UrlEncode(Model.strCategorie)},
                    {"smartBlogTitle", HttpUtility.UrlDecode(Model.strSmartBlogTitle)},
                 {"smartBlogComment", HttpUtility.UrlDecode(Model.strSmartBlogComment)},
    
                };
    
            SmartBlogLibraries.Helpers.Cms.CreateContent(Model.strNomDuContact, "annonce", Model.intId, colProperties, blnAutoApproveComments);
    
            IPublishedContent objNode = SmartBlogLibraries.Global.objUmbHelper.TypedContent(Model.intId);
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies