Copied to clipboard

Flag this post as spam?

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


  • Jonathan Bryant 3 posts 23 karma points
    Nov 27, 2011 @ 07:09
    Jonathan Bryant
    0

    Storing Prevalue Keys

    If I have a dropdownlist populated by a prevalue source with both a key and a value, how do I store the key rather than the value?

    For example, I want my select list to display the list of US state names. The key in this case is the two digit state code. When my client exports their data to csv, they want the state code to be displayed, rather than the state name.

    How can I do this? I guess I'm looking for something similiar to the Dropdown List, Publishing Keys datatype. I tried creating a new datatype, but contour doesnt pick them up. Any ideas?

    Thanks in advance.

     

  • jaygreasley 416 posts 403 karma points
    Nov 27, 2011 @ 09:12
    jaygreasley
    0

    Hi Jonathan,

    I'm not sure how you want to populate the ddl but I use http://our.umbraco.org/projects/developer-tools/dropdown-with-sql-source

    It is great for populating a ddl from a db with id and value.

    Alternatively try one of the uComponents datatypes:

    http://our.umbraco.org/projects/backoffice-extensions/ucomponents

    hth

    Jay

  • Jonathan Bryant 3 posts 23 karma points
    Dec 01, 2011 @ 16:17
    Jonathan Bryant
    0

    The standard components arent' available with contour. So I guess my only option is to use a custom datatype?

Please Sign in or register to post replies

Write your reply to:

Draft