Multiple categories selector for settings not working

Matthew Butler asked on September 27, 2022 16:04

I'm using the Multiple categories selector in Kentico 13 for a settings field, and although it shows and I can select the categories, when I save it doesn't write to the field.

If I change to a Multiple choice with SQL selecting from categories table the field works and saves, but I have a lot of categories, so I'd like to use the dialog.


Correct Answer

Juraj Ondrus answered on September 28, 2022 07:40

The issue here is how the categories work - it is an old design and the categories were designed to work with pages (node object). So, even if you use this form control for a page type, its value will be blank in the coupled data table. This is because the relationship between the page and its categories is saved into a binding table CMS_DocumentCategory which holds the DocumentID and CategoryID.
So, if you want to select the categories in Settings, there is no page object available thus no value gets stored nowhere. You need to use the general form controls like the Multiple choice, Dropdown list, UniSelector and use SQL query to get the list of categories.

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.