Copied to clipboard

Flag this post as spam?

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


  • Carlos Mosqueda 240 posts 431 karma points
    Nov 05, 2018 @ 15:42
    Carlos Mosqueda
    0

    NuPicker inside Umbraco Nested Content

    We are using a NuPicker TypeAhead inside of an Umbraco Nested Content.

    To get the label we are using this script as our template.

     {{postOrderCustomMessagingEventName? postOrderCustomMessagingEventName : postOrderCustomMessagingEventTypeId ? postOrderCustomMessagingEventTypeId : postOrderCommsEventNameOrTypeNameContains }}
    

    My output for the label picker looks like this:

    [{"key":"425","label":"425 - DOFBU Wonder Workshops Educator Break"}]
    

    We tried using a more complex version of this but we ran into an issue with this is that in the admin section when the frame/page loads for our nested content the labels come out as Item1, Item 2, etc.

    That code looked like this:

     {{((postOrderCustomMessagingEventName ? postOrderCustomMessagingEventName : postOrderCustomMessagingEventTypeId).substring(((postOrderCustomMessagingEventName ? postOrderCustomMessagingEventName : postOrderCustomMessagingEventTypeId).indexOf("\"label\":") + 9),(postOrderCustomMessagingEventName ? postOrderCustomMessagingEventName : postOrderCustomMessagingEventTypeId).length - 3 : postOrderCommsEventNameOrTypeNameContains ))}} 
    

    Not until you click on the Nested Content label, does the value of the NuPicker value come and populate the Nested Content label.

    I can't quite figure out how to get the Label portion of the object from NuPicker to show on the label.

    Thoughts?

    Thanks in advance.

Please Sign in or register to post replies

Write your reply to:

Draft