Set value to radio button list in nested content programatically
I have a nested content in one document type which I would like to fill from back end. I have a radio button list in the nested content. I managed to fill out the other text area properties except for the radio button list. I've read that I need to set the value of the nested property to the following json:
{
"name" : "Some item name",
"ncContentTypeAlias" : "yourDocTypeAlias",
"propertyAlias1" : "some value 1",
"propertyAlias2" : "some value 2"
}
Here's my code so far:
var ncItems = new List<NestedItem>();
foreach(var item in items)
{
var ncItem = new NestedItem();
ncItem.name = item.name;
ncItem.ncContentTypeAlias = "docTypeAlias";
ncItem.type = "radio-button-value"; // this is what it's not working
ncItem.placeName = item.name;
ncItem.distance = "0";
ncItems.Add(ncItem);
}
var ncItemString = Newtonsoft.Json.JsonConvert.SerializeObject(ncItems);
en.SetValue("nestedContentProperty", ncItemString);
Set value to radio button list in nested content programatically
I have a nested content in one document type which I would like to fill from back end. I have a radio button list in the nested content. I managed to fill out the other text area properties except for the radio button list. I've read that I need to set the value of the nested property to the following json:
Here's my code so far:
Anyone??
Hi Kevin
Did you solve the issue? Can you share with our community?
Thanks,
Alex
is working on a reply...