I have a content type with the field “myfield1” which is a sys_DropdownSingle type.
What is the velocity code I can put in the template to display both the selected value of the combobox and also the display label ?
Also, is there any documentation with sample velocity code to handle different fields types like combo boxes, radio buttons etc. ?
Are you using a keyword to populate your drop down box? If so, I can offer you a solution to your question.
To display the selected value, you can use either:
#field(“myfield1”)
OR
$sys.item.getProperty(“myfield1”).String
To display the selected label, use:
$rx.keyword.getLabel(“keyword name”,$sys.item.getProperty(“myfield1”).String)
I dont know of any documentation. I usually find all my answers here on the forum.
Hope this helps.
Keyword methods are documented on page 422 of theRhythmyx Implementation Guide