Need to create dropdown list in backend with value
I need to create a select list for my content people to be able to select one option off a list of options. When they see VOLVO below and select it, it should set the value to "1"
I cannot figure this out. It seems so very basic that your value and label for the option would be different yet I can't find a single thing to tell me how to do this.
Thank you very much Dennis, however I don't see how it helps. It shows me how to add the drop down options, but not the values which appear to be simply values starting at "0". I want the first option text to be "Emmit" and the value in the list for it to be "1234-234a".
I don't see how you can only have one set of choices when there needs to be a key/value pair arrangement.
I get this:
All that is fine, but these are the text labels between the option tags, and I need to assign a different value to each option value attribute.
The point is that I want the label to be human readable like these are, but I want the value to be some content that is not just some index number, like in my case, "/67" Now it is 0,1,2, etc.
Do I really need to build a case statement in Javascript to do the work changing the values in the browser? That seems awfully backwards.
One way around this would be to use nuPickers then you could set the prevalue source to be a set of content nodes. You can add any properties to those nodes you'd like and use those properties as you see fit. It will store the ID of the node by default I believe.
Need to create dropdown list in backend with value
I need to create a select list for my content people to be able to select one option off a list of options. When they see VOLVO below and select it, it should set the value to "1"
I cannot figure this out. It seems so very basic that your value and label for the option would be different yet I can't find a single thing to tell me how to do this.
Hi Matt,
Perhaps this documentation can help you a step further to do what you are trying to do.
https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/DropDown-List-Publishing-Keys
Hope this helps,
/Dennis
Thank you very much Dennis, however I don't see how it helps. It shows me how to add the drop down options, but not the values which appear to be simply values starting at "0". I want the first option text to be "Emmit" and the value in the list for it to be "1234-234a".
I don't see how you can only have one set of choices when there needs to be a key/value pair arrangement.
I get this:
All that is fine, but these are the text labels between the option tags, and I need to assign a different value to each option value attribute.
The point is that I want the label to be human readable like these are, but I want the value to be some content that is not just some index number, like in my case, "/67" Now it is 0,1,2, etc.
Do I really need to build a case statement in Javascript to do the work changing the values in the browser? That seems awfully backwards.
I want this:
One way around this would be to use nuPickers then you could set the prevalue source to be a set of content nodes. You can add any properties to those nodes you'd like and use those properties as you see fit. It will store the ID of the node by default I believe.
-Amir
is working on a reply...