Hi,
I have an News Item where one field is a Dropdown with values from an another Item.
The dropdown field in News Item:
[Name("Kategori")]
[Field("NewsCategory", typeof(DropDownListEditor<NewsCategory>))]
[OptionItem("NewsCategory", "Name", "Id", IncludeChilds = true, IncludeParagraphs = true, SourceType = Dynamicweb.Content.Items.Metadata.FieldOptionItemSourceType.CurrentArea)]
[Required]
The class with news categories
[Item("Nyhetskategori", "Nyhetskategori"), Category("Nyheter")]
[AreaRule,
StructureRule(StructureContextType.Paragraphs),
ParentRule(ParentRestrictionRule.ParentType.RootOfWebsite, ParentRestrictionRule.ParentType.RegularPage),
TitlePattern("{{Name}}"),
TitleField("Name")]
[CustomizedURLs]
public class NewsCategory: ItemEntry
{
[Name("Namn")]
[Field("Name", typeof(Dynamicweb.Content.Items.Editors.TextEditor))]
[Required]
public string Name{ get; set;}
}
The item renders fine in admin with the dropdown field. And the correct values are shown inte the dropdown.
But when I create a new "News" and save the value for the dropdown is NOT saved.
Does someone have an idea about what I missed?
Regards / Aki