Built in auto suggestion editor
Last week’s UI release added support for two built in auto suggestion editors giving the same functionality as I described in this previos blog post: http://world.episerver.com/Blogs/Linus-Ekstrom/Dates/2013/12/Auto-suggest-editor-in-EPiServer-75/. In this blog post we will create two editors that gives the editor suggestion in a drop down list that will look like this:
To implement this, just create a class that implements the new interface ISelectionQuery:
And to use this you can add the new AutoSuggestionEditor attribute to your property:
Notice how the second property sets the AllowCustomValues property to true. This means that the editor is not forced to select one of the suggested choices, it’s merely used for giving editors suggestions. By default, this property is set to false and the editor needs to select one of the suggested values.