CheckBoxList value is not saving using surfaceController
Hello All
I've created a custom property of type CheckBoxLIst and added few names in it. Now im trying to save a checkboxlist value selected by user from custom form using surfaceController and contentServices.I've created a string array and passing it to content service.
im able to render the value using below code
var NameCheckboxList = Services.DataTypeService.GetDataType(1234);
var hobbiesList = ((Umbraco.Core.PropertyEditors.ValueListConfiguration)NameCheckboxList .Configuration).Items;
var joinedNames = "[\"" + string.Join("\",\"", Model.Name) + "\"]";
and it return me a value like ["Apple","Mango,"Banana"].
and pass the joinedNames to contentServices like
var request = Services.ContentService.Create(Model.Name, parentId, "offerLightBoxItem");
request.SetValue("oLBName", offerLightboxModel.Name);
but its storing the value System.String[] in DB
Can any one help me out, how to save the checkboxlist value in DB
Im very new to umbraco
CheckBoxList value is not saving using surfaceController
Hello All I've created a custom property of type CheckBoxLIst and added few names in it. Now im trying to save a checkboxlist value selected by user from custom form using surfaceController and contentServices.I've created a string array and passing it to content service. im able to render the value using below code
and it return me a value like ["Apple","Mango,"Banana"]. and pass the joinedNames to contentServices like
but its storing the value System.String[] in DB Can any one help me out, how to save the checkboxlist value in DB Im very new to umbraco
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.