# Rich Article Select ## Example Overview This example enriches the selection interface with a detailed, visually appealing dropdown. Each option is rendered with custom HTML - author avatars, status badges, freshness indicators, category tags, and progress bars - giving editors a comprehensive overview of each article before they select. Reach for this pattern when users need to browse and choose records based on several attributes at once. **Visual Examples**   --- ## Key Code Segments ### Forms The form uses a `TomSelectModelChoiceField` with advanced rendering configurations. The `TomSelectConfig` object includes custom HTML templates for rendering options and selected items, allowing detailed metadata to be displayed in the dropdown. The option template is included as a multiline string within the `render` attribute of the `attrs` dictionary. It uses JavaScript template literals to define the structure of each option, including author avatars, status badges, category tags, and progress bars. :::{admonition} Form Definition :class: dropdown ```python class RichArticleSelectForm(forms.Form): """Form demonstrating rich article selection interface.""" article = TomSelectModelChoiceField( config=TomSelectConfig( url="autocomplete-rich-article", value_field="id", label_field="title", placeholder=_("Search articles..."), highlight=True, preload=True, minimum_query_length=1, css_framework="bootstrap5", attrs={ "render": { "option": """ `
This example demonstrates advanced option rendering with rich metadata and visual indicators.
Shows article completion based on status and word count: